feat(dotnet): support JUnit report format in record tests#1304
Open
Konboi wants to merge 2 commits into
Open
Conversation
Add `--format` option to `record tests dotnet` (default `junit`) and implement a JUnit path builder that mirrors the NUnit structure (Assembly -> TestSuite -> ... -> TestCase). Trim TAB characters and percent-decode tokens so test paths produced by custom JUnit emitters remain usable for `dotnet test --filter`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
The path canonicalizer in case_event.py replaces `\` with `/` on Windows, so a fixture containing `%5C` (decoded to `\`) produced a different golden payload on Windows than on Linux/macOS. Replace it with a `%3A` (`:`) sample that exercises the same percent-decode path without depending on platform-specific path normalization. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--formatoption torecord tests dotnet(defaultjunit) so reports produced bydotnet test --logger junitcan be ingested directly.Assembly -> TestSuite -> ... -> TestCasestructure as the NUnit parser, so the subset output (FullyQualifiedName=...|...) keeps working withdotnet test --filterunchanged.name/classname/<testsuite name>. Some custom dotnet JUnit emitters pack metadata into those fields with TAB separators and URL-encode characters such as\(%5C) and:(%3A); normalizing this is required for the resulting paths to be valid filter expressions.Test plan
uv run poe test tests/test_runners/test_dotnet.py— 6 tests pass (NUnit / JUnit / JUnit-with-metadata / invalid format / 2 subset cases)uv run poe lint— cleanuv run poe type— no issues🤖 Generated with Claude Code