简体   繁体   中英

Save Results in Visual Studio 2012 Test Explorer

I have been working on UI Automation to perform unit testing using NUnit in Visual Studio 2012. The NUnit is integrated in my VS2012 .
I need to store the results of the test such as pass/fail status, the error message and the other available details in the test explorer somewhere in a human readable form.
I know that VS2010 we used to get the .trx file which could be used further. How do I get the result in VS2012? Is it even possible?

I can at least assure you that it's possible with TFS, as we did this in our company. But I don't remember every detail. The basic steps are:

  • Create a build definition to run NUnit tests (use the conrole runner for this)
  • Transform the result XML (TestResult.xml) to VS format (.trx) using a tool. There are several around, try to g00g1e it.
  • Publish the transformed results to TFS (done in the build script).

It seems that it is not possible to somehow log all test results, when run directly in VS. In this case the only chance you have, is to run the tests externally using the NUnit runners (GUI or Console) and store the TestResults.xml output file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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