Cucumber-Json flags failed tests as passed if an exception occurs
まだ誰も着手していません。
評価
調査の方向性
未定義のステップと --cucumber-json フラグを指定して feature を実行し、問題を再現してから、生成された cucumber-JSON と scenario.steps の処理を調査します。KeyError または FixtureLookupError によって、レポート内でテストケースが成功ではなく失敗として表示されれば、修正は完了です。
索引モデルが issue の本文から書いたものです。
説明
Version: bdd-4,0,2 pytest: 6.2.2
Summary
When a test fails with eg an keyerror exception due to an invalid test step, the cucumber-json will mark the test case as passed. When imported back into eg XRAY the test is marked as passed when in fact it has not.
This happens because the invalid step is not included in the test report scenario.steps and will therefore not appear in the cucumber-json causing test cases results to be inaccurate.
Steps to Repro:
- Execute a feature file containing a step not defined in the framework. This will trigger an KeyError exception and a FixtureLookupError. Ensure the --cucumber-json flag was passed into pytest-bdd :
Scenario: repro
Given this step should exist and be valid
And this step should not exist
- Examine the resultant cucumber-json file. Notice the test case is marked as passed as the erroring test step was not included.
- 主要言語
- Python
- スター
- 1.5k
- フォーク
- 253
- 平均マージ
- 4時間 30分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytest-dev/pytest-bdd のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pytest-dev/pytest-bdd#838 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
pytest-dev/pytest-bdd#805 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
pytest-dev/pytest-bdd#785 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
pytest-dev/pytest-bdd#784 ·
-
Tests with failing setup fixture should get the "Error" status対応中かも @zvarych-oleksii が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
pytest-dev/pytest-bdd#782 ·
pytest-dev/pytest-bdd の issue をすべて見る
似ている issue
-
[Resource]: Loreオープンresource-submission validation-passed
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
hesreallyhim/awesome-claude-code#3234 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openminion/openminion#376 ·
メンテナーはふだん 1 日以内に返信
-
Type: ☹︎ Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
posit-dev/great-tables#1028 ·
メンテナーはふだん 1 日以内に返信
-
integration: apple_tv
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
home-assistant/core#188282 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
A "since" range is worded as a career: "the past two seasons" says "regular season career (2025 on)"オープンP4: low
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
jeffknupp/association#538 ·