In Visual Studio 2013, running all my Visual Studio unit tests shows the test results, together with callstack, exception information and a stack trace of failing tests. Is there any way of saving the test results, after test execution, such that I can open up previously run tests?
I have read posts that explain that failing test results are kept, in the TestResults folder, while successful tests are deleted. Unfortunately neither failing nor successful test results remain, in my TestResults folder, after running the tests.
I tried creating and using a .runsettings file and setting the element to false, but this didn't change anything.
Anyone know how to keep the test results, for later inspection?
Hi I have the same problem, the solution for me was use command console.
You need to use VSTest.console.exe located at : C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow
You should go to that location using visual studio command prompt. After that type: VSTest.console yourFullProjectPath\YourTestProject\bin\reléase\YourTest.dll /logger:trx
After completed you can find results in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\TestResults
Regards
In Visual Studio 2019, the closest I can get to a 'report' using just the GUI and no command lines is to select the tests you want to export (you can use CTRL+A
to select all) and then using CTRL+C
to copy.
Afterwards, you can paste to any text editor or Excel spreadsheet, it will look a bit funky like this:
As you can see, the first column has the test name and result. But with a bit of manipulation in Excel then you probably can get some nicer looking result :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With