Make a non-empty `esults.errors` a dependable signal of an unsuccessful run
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 15/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- json
- Domínio
- testing
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Sem dados de linguagem
- Estrelas
- 104
- Forks
- 4
- Merge médio
- 1h 3min
- PRs com merge (30d)
- 2
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ctrf-io/ctrf
-
Also Mention UUID version 8Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 76/100
ctrf-io/ctrf#59 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 18/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
Mantenedores costumam responder em até 1 dia
-
CTRF 0.3.0 preparationAberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 20/100
Mantenedores costumam responder em até 1 dia
-
Proposal: Add optional `threadId` to `retryAttempts` entriesTalvez já em andamento @alexshamrai assumiu há 12 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
ctrf-io/ctrf#74 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de ctrf-io/ctrf
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
microsoft/vscode-containers#655 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
pylint-dev/pylint#11791 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Mantenedores costumam responder em até 1 dia
-
bug implicit-state
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
bug testing
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia