Repository navigation
Fix for issue 1351 - #1449
Merged
Merged
Fix for issue 1351#1449
Conversation
Contributor
There was a problem hiding this comment.
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
TestMethodIdentifierBuilderto create an MTPTestMethodIdentifierPropertyfrom assembly path, class name, and method name. - Persists NUnit
ClassNameandMethodNameontoTestCaseinstances during discovery and XML event conversion. - Adds an MTP bridge hook (
AddAdditionalProperties) to attach theTestMethodIdentifierPropertyto each emittedTestNode.
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.
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.
Fixes #1351
TerjeSandstrom_MSI_2026-06-07_08_38_39.2706565.zip
Enclosed the resulting Trx file from the repro code.