Skip to content

Fix #2143: keep NUnit2.5 mixed suite results valid#2752

Draft
nohwnd wants to merge 1 commit into
mainfrom
fix/2143-nunit-foreach-xml
Draft

Fix #2143: keep NUnit2.5 mixed suite results valid#2752
nohwnd wants to merge 1 commit into
mainfrom
fix/2143-nunit-foreach-xml

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 25, 2026

Copy link
Copy Markdown
Member

Fix #2143

NUnit2.5 results can contain either test-suite children or test-case children, but not both. When a block has ForEach tests and a plain test, the ForEach wrapper made the plain test a mixed sibling. I wrap the plain test in a suite only in that mixed case, and added a schema validation test.

Wrap plain test cases when an NUnit2.5 results node also contains child suites. This keeps the schema choice consistent for mixed ForEach and plain tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
$Node.Tests | & $SafeCommands['Group-Object'] -Property GroupId | & $SafeCommands["Sort-Object"] -Property Name
)

$hasParameterizedTestSuites = 0 -lt @($suites | & $SafeCommands['Where-Object'] { $_.Name }).Count
@nohwnd nohwnd added this to the 6.0.0-future milestone Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The NUnit report is invalid when some tests contain ForEach/TestCase data

2 participants