[英]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.xml
file created, which can further be used for example by ReportUnit to create nice looking reports.当使用nunit-console.exe
从命令行运行测试时,您可以创建一个result.xml
文件, ReportUnit等可以进一步使用它来创建美观的报告。
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?当不是通过 nunit-console 而是通过 Test Explorer Window 使用NUnit (3.0) Test Adapter for Visual Studio运行测试时,有没有办法生成这个 result.xml 文件?
At least I wasn't able to find an xml file after the tests finished running, so I assume, that there is none created.至少在测试运行完成后我找不到 xml 文件,所以我假设没有创建任何文件。
* I'm using Microsoft Visual Studio Community 2015 * 我正在使用 Microsoft Visual Studio Community 2015
NUnit XML output could be produced by the NUnit console and GUI runners only. NUnit XML输出只能由NUnit控制台和GUI运行程序生成。 You won't get it with Visual Studio 你不会用Visual Studio得到它
It should be possible by specifying the ResultsDirectory
property in your .runsettings
file.应该可以通过在.runsettings
文件中指定ResultsDirectory
属性来实现。 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 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年
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.