I use Azure Test Plans to run my integration tests. I want to apply Unit '--result:path/to/result/file.result.xml;format=custom' to get short result instead of '.trx' that contain a lot of redundant information. I've tried to use Releases -> Task -> Test run for Test plans and set this parameter to unit adapter through console but get an error. May be you know the way how to apply this param to get short test result.
I expected that when test run finished in Run Attach I will get *.xml file instead of .trx file. I have custom extension method for Nunit that describes *.xml result file.
Best regards, Vladimir L.
To generate a test result with XML format for NUnit tests in Azure DevOps, you can use the NUnitXml.TestLogger package.
Add the
NUnitXml.TestLoggerpackage to your test project. In your test project, add the following code to the.csprojfile:In your build pipeline, add the following command to the dotnet test task:
Tried that in VSTest task by specifying
/logger:trx;LogFileName=Nunit-test-results.xmlin the "Other console options". From the logs we can see that thexmlformat test result file is generated, but the VSTest task tries to find thetrxformat test results to publish which is not existing there and failed test task.So, maybe you can try the
dotnet testin pipeline.