Cucumber-Json flags failed tests as passed if an exception occurs
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Tái hiện vấn đề bằng cách chạy feature với một step chưa được định nghĩa và flag --cucumber-json, sau đó kiểm tra cucumber-JSON được tạo ra và cách xử lý scenario.steps. Bản sửa hoàn tất khi một KeyError hoặc FixtureLookupError khiến test case xuất hiện là thất bại thay vì thành công trong báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1.5k
- Fork
- 251
- Merge trung bình
- 43 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pytest-dev/pytest-bdd
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
pytest-dev/pytest-bdd#805 ·
-
YAML support removed in v8Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
pytest-dev/pytest-bdd#785 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
pytest-dev/pytest-bdd#784 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
pytest-dev/pytest-bdd#782 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
pytest-dev/pytest-bdd#780 · 3 reaction ·
Tất cả issue của pytest-dev/pytest-bdd
Issue tương tự
-
ACK_WAITING HELP_WANTED UPDATE_CS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OWASP/CheatSheetSeries#2458 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
BasedHardware/omi#19711 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Qwen3_5MoeModel no longer returns router_logits, breaking aux loss with output_router_logits=TrueĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
huggingface/transformers#49172 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vllm-project/vllm-metal#885 ·
Maintainer thường phản hồi trong vòng 1 ngày