TRX className for generic test classes differs between source-generated and reflection modes
I maintainer di solito rispondono entro 1 giorno
Una pull request collegata è già stata integrata.
- #7200 di @thomhurst — integrata
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- csharp
- Ambito
- testing-qa
Direzione di ricerca
Start with the TRX className values in the issue and compare how source-generated and reflection modes produce them. Read src/TUnit.Engine/Extensions/TestExtensions.cs and the #6433 type-name format decision; the issue also points to tests/TUnit.TestProject/Bugs/_7106. Reproduce with the supplied commands and compare the two TRX files; done means both modes produce the same class name for generic tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What I saw
While running tests/TUnit.TestProject (net10.0, Release) with --treenode-filter "/*/TUnit.TestProject.Bugs._7106/*/*" --report-trx in each mode, the TRX className for tests on generic classes is different:
- Source-generated mode:
TUnit.TestProject.Bugs._7106.GenericClassSameTypeRows1` - Reflection mode (
--reflection):TUnit.TestProject.Bugs._7106.GenericClassSameTypeRows1[[System.Int32, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]`
Every generic class in Bugs/_7106 shows the same split. In reflection mode, rows that infer different type arguments are also split across several class names (GenericClassMixedTypeRows1[[System.Int32...]]and...[[System.String...]]`), while source-generated mode groups them under one name.
Found while working on #7123 (PR #7150). The difference is not related to that change.
Repro
cd tests/TUnit.TestProject
dotnet build -c Release -f net10.0
bin/Release/net10.0/TUnit.TestProject.exe --treenode-filter "/*/TUnit.TestProject.Bugs._7106/*/*" --report-trx --report-trx-filename sg.trx
bin/Release/net10.0/TUnit.TestProject.exe --treenode-filter "/*/TUnit.TestProject.Bugs._7106/*/*" --reflection --report-trx --report-trx-filename refl.trx
Compare the className= attributes in the two files.
Expected
The same class name in both modes, so that TRX consumers and CI test-history grouping see the same identity whichever mode runs. The likely source is the type name that reaches the TRX reporter (TestMethodIdentifierProperty in src/TUnit.Engine/Extensions/TestExtensions.cs, or the closed Type that reflection mode reports). This needs checking against the #6433 decision on the type-name format.
- Lingua principale
- C#
- Stelle
- 4k
- Fork
- 139
- Merge medio
- 7h 44m
- PR unite (30g)
- 271
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un 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 thomhurst/TUnit
-
Flaky: RpcTests Discovery_ReturnsFullTestCatalogue times out waiting for TCP connection on macOS CIApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
thomhurst/TUnit#7229 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
JSON output still uses assembly-qualified Type.FullName for parameter and return typesForse già presa @Saad-elnagar l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
thomhurst/TUnit#7201 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
thomhurst/TUnit#7194 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di thomhurst/TUnit
Issue simili
-
/api/oauth/introspect emits clientId and tokenType instead of RFC 7662's client_id and token_typeApertabug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nightscout/nocturne#2317 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: Position intent set on a simple order is dropped when it becomes a bracket, OCO or OTO orderForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
alpacahq/alpaca-trade-api-csharp#903 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
joinrpg/joinrpg-net#5752 ·
I maintainer di solito rispondono entro 1 giorno
-
bug ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CodeForFire/lagebuch#714 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
dimitar-radenkov/Pointframe#294 ·
I maintainer di solito rispondono entro 1 giorno