Make a non-empty `esults.errors` a dependable signal of an unsuccessful run
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- json
- Lĩnh vực
- testing
Hướng nghiên cứu
This is a specification change, not a code fix: the proposed SHOULD rule belongs in the results.errors section of the CTRF spec, building on #88's results.errors shape. Read #65, #88 and the linked Jest and xUnit precedents to see how other formats record run-level failures. Done means agreed spec wording with maintainer sign-off, and any reporter or consumer changes are tracked in their own repositories.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follow-up to #65, from this comment. Builds on #88, which adds results.errors: [{message, trace, extra}].
Problem
#88 says "Consumers MUST account for reported global errors when interpreting the run." Nothing requires a producer emit an error when the run fails. Some frameworks report a failed run with only a status and no error object. Playwright is one: FullResult.status can be failed, timedout, or interrupted even when no test failed. A producer that only copies error objects into results.errors writes a report that looks green, and the consumer MUST has nothing to act on.
The broader test-reporting ecosystem keeps fixing this bug over and over:
- Playwright's own JUnit reporter has no
onErrorhandler, so it reports exit 1 with 0 failures. - allure-playwright has
onError(): void {}. - Vitest JSON, node:test JUnit and cargo2junit also drop the error. Vitest's JUnit reporter fixed exactly this in 2026 (PR #10244).
- playwright-ctrf-json-reporter#123 works around it today with a synthetic failed test, which #88's "Global errors MUST NOT be counted as test results" would forbid.
Precedent
Formats that keep errors separate from tests still guarantee an entry when the run fails:
- Jest sets
testExecErroron the file result and countsnumRuntimeErrorTestSuites. - xUnit v3's CTRF writer records cleanup and fatal errors in
results.extra.suites[].errors[]and leavestestsandfaileduntouched.
Proposal
Add to the results.errors section:
A producer SHOULD emit at least one
results.errorsentry when the framework reports the run as unsuccessful but no test result failed. If the framework provides no error object, the entry SHOULD describe the reported status (for example, "Run ended with statustimedout").
With this rule, a consumer can rely on summary.failed > 0 || results.errors.length > 0 to detect a failed run, without knowing each framework's status vocabulary.
Consumer adoption
None of the CI consumers I checked read run-level error fields:
- ctrf-io/github-test-reporter gates
exit-on-failonly onsummary.failed > 0. - mikepenz/action-junit-report passed a report with 11 suite-level errors and 0 failures (issue #1005).
Having github-test-reporter's exit-on-fail also fail on a non-empty results.errors would put the consumer MUST into practice for the most common CTRF consumer. That could be tracked separately in that repo.
Once this lands, I'm happy to rework playwright-ctrf-json-reporter#123 and https://github.com/ctrf-io/jest-ctrf-json-reporter/pull/95to emit results.errors this way.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 103
- Fork
- 4
- Merge trung bình
- 1 giờ 3 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 ctrf-io/ctrf
-
Also Mention UUID version 8Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
ctrf-io/ctrf#59 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
CTRF 0.3.0 preparationĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Proposal: Add optional `threadId` to `retryAttempts` entriesCó thể đã có người làm @alexshamrai đã nhận 12 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
ctrf-io/ctrf#74 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
discobox-ai/discobox#860 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/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 86/100
liberation-data/drivine-cypher-spec#67 ·
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 78/100
code-yeongyu/oh-my-openagent#12784 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug raised-by:verifier
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
medici-finance/assay#5697 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày