So {a}
refers to the test case arguments, but in the full name of the test case we can see the test fixture arguments. For example:
C:\DFDeploymentSmokeTests\LocalTestProfiles> $xml = [xml](cat ..\TestResults\CSTests.xml)
C:\DFDeploymentSmokeTests\LocalTestProfiles> $TestCase = $xml.SelectSingleNode('//test-case')
C:\DFDeploymentSmokeTests\LocalTestProfiles> $TestCase.name
SiteCheck
C:\DFDeploymentSmokeTests\LocalTestProfiles> $TestCase.fullname
Web.ForEachWebServer(nan4dfc1app01_10.192.78.221_smoketest.dayforce.com).SiteCheck
C:\DFDeploymentSmokeTests\LocalTestProfiles>
The nan4dfc1app01_10.192.78.221_smoketest.dayforce.com
is the ToString()
result of the Test Fixture argument and NUnit includes it in the fullname of a test case.
However, there does not seem to be a way to provide it in the --test-name-format
command line parameter.
Or am I wrong and there is a way?
Clarification
I do not want to change the full name of a test, but just its name. My problem is with the test names under a fixture using TestFixtureSource
. Indeed, suppose the fixture name is F
, the tests under it are T1
and T2
and the fixture is invoked twice with arguments A1
and A2
. The default test name pattern is {m}{a}
, but {a}
does not include the fixture parameters. So, the test report shows these test names (not full names):
T1
T2
T1
T2
This is how it shows in the Azure DevOps Tests (the Publish Tests plugin uses the test names when publishing the results)
I want to change the name to be equal to the full name, because the full names are:
F(A1).T1
F(A1).T2
F(A2).T1
F(A2).T2
I realize that if the name would be F(A1).T1
, then the full name would be F(A1).F(A1).T1
, but since UI does not show the full names, I can live with that.