Skip to content

Fix for issue 1351 - #1449

Merged
OsirisTerje merged 2 commits into
mainfrom
Issue1351
Jun 12, 2026
Merged

OsirisTerje merged 2 commits into
mainfrom
Issue1351

Conversation

@OsirisTerje

Copy link
Copy Markdown
Member

Fixes #1351

TerjeSandstrom_MSI_2026-06-07_08_38_39.2706565.zip

Enclosed the resulting Trx file from the repro code.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses #1351 by ensuring TRX reporting under the Microsoft Testing Platform (MTP) receives enough structured test metadata (class + method identity) to produce a correct TestMethod className=... for parameterized fixtures.

Changes:

  • Introduces TestMethodIdentifierBuilder to create an MTP TestMethodIdentifierProperty from assembly path, class name, and method name.
  • Persists NUnit ClassName and MethodName onto TestCase instances during discovery and XML event conversion.
  • Adds an MTP bridge hook (AddAdditionalProperties) to attach the TestMethodIdentifierProperty to each emitted TestNode.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/NUnitTestAdapter/TestingPlatformAdapter/TestMethodIdentifierBuilder.cs New helper to construct TestMethodIdentifierProperty for MTP.
src/NUnitTestAdapter/TestingPlatformAdapter/NUnitBridgedTestFramework.cs Adds additional MTP properties to test nodes based on stored NUnit metadata.
src/NUnitTestAdapter/TestConverterForXml.cs Stores NUnit class/method metadata on TestCase created from XML events.
src/NUnitTestAdapter/TestConverter.cs Stores NUnit class/method metadata on TestCase created from discovery nodes.
src/NUnitTestAdapter/Seed.cs Registers new TestProperty keys for class/method metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/NUnitTestAdapter/TestConverter.cs Resolved
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.

Test class name missing in TRX report for parametrized fixture when running through MTP

2 participants