简体   繁体   English

NUnit - 在 Visual Studio 中使用测试适配器运行测试时获取结果 xml

[英]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等可以进一步使用它来创建美观的报告。

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?当不是通过 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.

相关问题 在终结器中抛出异常时,Visual Studio 测试资源管理器未完成运行 NUnit 测试 - Visual Studio Test Explorer doesn't finish running NUnit tests when exception in finalizer is thrown 从Visual Studio 2015运行nunit测试 - running nunit tests from visual studio 2015 在Visual Studio Test Runner中从外部测试套件程序集运行NUnit测试 - Running NUnit tests from external test suite assembly in Visual Studio Test Runner 在Visual Studio 2010中使用代码覆盖率运行NUnit测试 - Running NUnit tests in Visual Studio 2010 with code coverage 通过NUnit GUI 0.60运行测试时如何使Visual Studio 2017达到断点? - How to make Visual Studio 2017 hit breakpoints when running tests through NUnit GUI 0.60? 即使选择单个测试,Nunit 也会在 TestFixture 上运行所有测试 - Nunit running all tests on TestFixture even when selecting single test 单元测试,NUnit或Visual studio? - Unit test, NUnit or Visual studio? 如何在使用 VSTS(单元测试适配器)运行测试时生成 NUnit XML 报告 - How to generate NUnit XML report while running test using VSTS (Unit Test Adapter) 使用Nunit测试适配器在Visual Studio 2013中按类名称和方法名称进行分组测试 - Group test by class name and method name in visual studio 2013 with Nunit test adapter 当测试类从实现NHibernate的类继承时,Visual Studio 2017未发现NUnit测试 - Visual Studio 2017 not discovering NUnit tests when tests class inherits from a class that implements NHibernate
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM