Cucumber-Json flags failed tests as passed if an exception occurs
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Riproduci il problema eseguendo la feature con uno step non definito e il flag --cucumber-json, quindi ispeziona il cucumber-JSON generato e la gestione di scenario.steps. La correzione è completa quando un KeyError o FixtureLookupError fa sì che il caso di test risulti fallito anziché superato nel report.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 1.5k
- Fork
- 252
- Merge medio
- 2h 8m
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pytest-dev/pytest-bdd
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pytest-dev/pytest-bdd#838 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
pytest-dev/pytest-bdd#805 ·
-
YAML support removed in v8Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
pytest-dev/pytest-bdd#785 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
pytest-dev/pytest-bdd#784 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
pytest-dev/pytest-bdd#782 ·
Tutte le issue di pytest-dev/pytest-bdd
Issue simili
-
approved Good First Issue scope: docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
hiero-ledger/hiero-sdk-python#2730 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
wemake-services/wemake-django-template#3178 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
md/asciidoc/csv: an explicit `encoding="utf-8"` keeps a leading BOM, the auto-detect path drops itAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
docling-project/docling#4846 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
neurostuff/NiMARE#1181 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pytest-dev/pytest#15180 ·
I maintainer di solito rispondono entro 1 giorno