drkthng
drkthng

Reputation: 6909

NUnit - Getting results.xml when running tests with Test Adapter in Visual Studio

When using nunit-console.exe to run tests from the command line you can have a result.xmlfile created, which can further be used for example by ReportUnit to create nice looking reports.

Question

Is there a way to produce this result.xml file when running the tests not via nunit-console but with the NUnit (3.0) Test Adapter for Visual Studio via the Test Explorer Window?

At least I wasn't able to find an xml file after the tests finished running, so I assume, that there is none created.

* I'm using Microsoft Visual Studio Community 2015

Upvotes: 5

Views: 4013

Answers (2)

Dek Dekku
Dek Dekku

Reputation: 1461

It should be possible by specifying the ResultsDirectory property in your .runsettings file. If you don't have one, check the docs:

https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2015

Upvotes: 0

unickq
unickq

Reputation: 3350

NUnit XML output could be produced by the NUnit console and GUI runners only. You won't get it with Visual Studio

Upvotes: 0

Related Questions