Fix #2793: Use proper FQN in VS Test Explorer to avoid hierarchy split#2978
Merged
timcassell merged 1 commit intodotnet:masterfrom Jan 27, 2026
Merged
Fix #2793: Use proper FQN in VS Test Explorer to avoid hierarchy split#2978timcassell merged 1 commit intodotnet:masterfrom
timcassell merged 1 commit intodotnet:masterfrom
Conversation
…y split When job display name contains '.' (e.g., '.NET 8.0.6'), VS Test Explorer interprets it as a namespace separator, causing incorrect hierarchy grouping. Detect Visual Studio environment via VSAPPIDNAME env variable and use the benchmark method FQN instead of displayName for the test case.
Collaborator
|
@filzrev Can you verify this? |
Contributor
|
I've tested on local VS environment. I've not tested on Rider and Resharper environment. |
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.
.(e.g., ".NET 8.0.6")VSAPPIDNAMEenvironment variablemisinterpreted as namespace separators
Test plan
like ".NET 8.0.6") display correct hierarchy without unintended grouping
Why no automated tests
The
ToVsTestCaseextension method andBenchmarkCaseExtensionsclass areinternalto theBenchmarkDotNet.TestAdapterassembly. Adding unit tests would require exposing internals viaInternalsVisibleTo,which introduces cross-project dependencies and framework compatibility complexity between TestAdapter
(
netstandard2.0) and the test project. Since the fix is straightforward and follows the exact pattern suggested inthe issue, manual verification in VS Test Explorer is sufficient.