Allow use of FullName as the DisplayName for Converted Tests
See original GitHub issueWhen reporting a bug, please provide the following information to speed up triage:
- NUnit and NUnit3TestAdapter versions
- Visual Studio edition and full version number (see Help About)
- A short repro, preferably attached or pointing to a git repo or gist
- What .net platform and version is being targeted
- If TFS/VSTS issue, what version, hosted, on-premises, and what build task you see this in
Referencing this issue: https://github.com/nunit/nunit/issues/3015
We would like to include the TestFixture parameters value(s) in the TestName that gets created by the Test Adapter. Currently the only way to change the TestName is by using the
DefaultTestNamePattern
As noted in the referenced issue, there is not a way currently to specific the inclusion of the TestFixture parameters (when they exist). The workaround suggested was to allow for the usage of FullName as an option in the Nunit Test Adapter.
–
Issue Analytics
- State:
- Created 4 years ago
- Comments:21 (14 by maintainers)
Top Results From Across the Web
DisplayNameFor() From List<Object> in Model
I believe this is pretty simple, I just can't seem to find the right way to show the display name for an item...
Read more >c# - Change name of NUnit test
So far I can see, that FullName field of TestDetail has private setter. Is any other ways or approaches change display name for...
Read more >Tips and Tricks | NUnit Docs
Using DisplayName you can change between Name , FullName or FullNameSep . The last one will then use the FullNameSeparator,which defaults to '...
Read more >MAC Outlook can't change display name imap in new version
My main concern is Account full name (sender's name) cannot be edited in new outlook. But today I remark that this full name...
Read more >Converting full name to user id for use in reporter field
Manually, it works, but with the automation, it fails, even though the name matches the users display name.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks @CharliePoole and @svengeance for bringing this one up again.
FQN: The FQN issue is still open, and we’re discussing with the MS PG how to go about these things. It is pretty clear now that the FQN (which @svengeance is referring to above) is not working, and it has to change.
About this issue in particular: What you see in the Test Explorer is a mixture of two properties, FullyQualifiedName (FQN) and DisplayName.
It will display the following:
and this is what NUnit sends to the adapter:

The properties @svengeance points to above affects only the FQN from NUnit. Given a repro like this:
Now, looking at what is being displayed for the different parts (putting the adapter into freak mode):
As can be seen from this, the TestMethod in itself is display by the DisplayName property, which comes from the NUnit Name property, but all the overlying nodes are picked from the FQN, which each part, separated by the dots, are one level in the tree.
If we now implement the DisplayName to be equal to the FQN, it should bring along the format wanted:
This could also be resolved in NUnit itself, but the replacing of the dots are rather VS specific. I am not sure if the Template Based Test Naming can be set up to provide the FQN here, @CharliePoole ?
If it is set in NUnit, it would apply to individual tests, but if set in the adapter, it would apply to all.
A short disclaimer here: The Real Time Test Discovery would still report the first name. It is first after execution that these names will come up. If RTD is turned off, then NUNit Test Discovery would kick in, and it would be displayed correctly.
@OsirisTerje how do I enable this feature, running tests with
dotnet testbut the class parameters are not includedI using
do I need to add anything to runsettings?