Clarify spec intent: common xtra field names, labels vs xtra.traits, stdout/stderr line-splitting
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Documentazione
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Ambito
- documentation, testing-qa
Direzione di ricerca
Inizia esaminando le descrizioni dello schema CTRF per extra, labels, stdout e stderr, quindi confronta le interpretazioni collegate di xunit.v3 e Microsoft.Testing.Platform. Il lavoro è completato quando la specifica definisce chiaramente le chiavi extra comuni, labels rispetto a traits, la suddivisione in righe e se gli array di output vuoti sono presenti o omessi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
We are adding a CTRF reporter to Microsoft.Testing.Platform (the engine behind MSTest, xunit.v3, NUnit, and various other .NET test frameworks). Brad Wilson (xunit) recently published a side-by-side comparison (microsoft/testfx#8903) of his xunit.v3 CTRF emitter vs ours, and several differences boiled down to "the spec doesn't say". Before each ecosystem settles on its own conventions, we would love your guidance on the following so that CTRF documents produced by different .NET reporters are interoperable.
1. Canonical key names for common extra fields
The spec marks environment and per-test as additionalProperties: false for everything except extra, which is the freeform escape hatch. That works, but means two producers reporting the same concept (machine name, exception type, etc.) can pick different keys inside extra, hurting tooling that wants to consume both.
Two concrete examples we hit:
- Machine / hostname: we emit
environment.extra.machine; xunit.v3 emitsenvironment.extra.computer. - Exception type name: we emit
tests[].extra.exceptionType(e.g.System.InvalidOperationException); xunit.v3 emitstests[].extra.exception.
Are there "recommended" key names for these (and other widely useful fields like build agent, runtime version, framework name)? It would be great either to (a) bless one of the two existing names per concept, or (b) publish a non-normative "common extra keys" appendix so future producers can converge.
2. What is labels for?
The spec says labels is "Structured key-value metadata for the test case (e.g. priority, severity, external identifiers)" typed as an object whose values are string | number | boolean.
We read the e.g. as non-exhaustive and use labels for the test framework's user-defined key/value traits (e.g. Category=Smoke, Owner=alice). xunit.v3 instead puts traits under tests[].extra.traits because Brad reads labels as restricted to the three listed examples (priority/severity/external IDs).
Could you clarify the intent?
- Option A -
labelsis the right place for any structured key/value test metadata (our reading). - Option B -
labelsis reserved for a narrow administrative set; arbitrary trait-style metadata should go underextra. - Option C - something else (e.g.
parametersfor data-driven inputs,labelsonly for the three listed examples,extra.traitsfor everything else).
We are happy to follow whichever interpretation matches your intent - just want to avoid two .NET CTRF producers diverging on something this central.
3. Are stdout / stderr meant to be one entry per physical line?
The schema describes both as "Standard output lines from test execution", typed as an array of strings. We initially emitted a single multi-line string (one array element with embedded \n); we have since switched to one element per LF-terminated line (with CRLF normalization and the trailing newline not producing an extra empty entry).
Two follow-ups:
- Is that one-element-per-physical-line interpretation what the spec author intended?
- For tests that produce no captured output, should the array be present-and-empty (
[]), or omitted entirely? We currently omit it; the spec doesn't say.
Thanks for the work on CTRF - it has made a real difference for us standardizing across .NET test frameworks.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 98
- Fork
- 4
- Merge medio
- 1h 21m
- PR unite (30g)
- 1
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 ctrf-io/ctrf
-
Also Mention UUID version 8Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 32/100
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 48/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
Tutte le issue di ctrf-io/ctrf
Issue simili
-
documentation good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
zmo2s/agent-toolbox#23 ·
-
✨ enhancement needs-discussion
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr issue-rating: 🌊 off-meta tidepool P3
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
openclaw/openclaw#168070 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
agent: ready area: submission priority: high type: docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
dkritarth/scopewatch#213 ·
I maintainer di solito rispondono entro 1 giorno
-
Broken link in RELEASE.mdForse già presa @Jah-yee l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
sphinx-contrib/httpdomain#143 ·
I maintainer di solito rispondono entro 1 giorno