简体   繁体   English

NUnit-2 | 运行时获取TestResult.xml报告

[英]NUnit-2 | Get TestResult.xml report in runtime

I have a single Test.dll which have thousands of test case inside it.我有一个 Test.dll 里面有数千个测试用例。 I am using the NUnit 2.x framework.我正在使用 NUnit 2.x 框架。 When running NUnit test by NUnit-console, I must wait several hours and just get the test report after it finished the whole test suit.通过 NUnit-console 运行 NUnit 测试时,我必须等待几个小时,才能在完成整个测试套件后才能获得测试报告。

May I get the TestResult.xml more frequently.我可以更频繁地获得 TestResult.xml 吗? Now, I cannot catch up the test progress (how many passed, failed, in running...)现在,我无法赶上测试进度(有多少通过、失败、正在运行……)

Thank you谢谢

The NUnit V2 console runner provides an XML result output, which it creates at the end of the test run. NUnit V2 控制台运行程序提供 XML 结果 output,它在测试运行结束时创建。 Since it's legacy software, no longer under active development, that's not likely to change.由于它是遗留软件,不再处于积极开发中,因此不太可能改变。

However, the runner does provide the labels option, which causes the name of each test to be written to the console at the time it starts.但是,运行程序确实提供了labels选项,这会导致每个测试的名称在启动时写入控制台。

For a more detailed output while the test runs, you may run a debug build of your tests under a debugger.有关测试运行时更详细的 output,您可以在调试器下运行测试的调试版本。 In that case, the console runner writes information about any test failures to the trace output.在这种情况下,控制台运行程序会将有关任何测试失败的信息写入跟踪 output。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM