austincrft
austincrft

Reputation: 342

Where is the Visual Studio 'Test Explorer' Output located? Is it a saved file?

I'm using SpecFlow for unit testing in Visual Studio 2013, and when I run tests from the Test Explorer window, there is a link to an Output which shows anything written to the console during the test.

Output link

When right-clicking the tab, I don't have the option to Open Containing Folder like I do with other project files.

Path-related options not available

Is this a file that's being saved somewhere? Can I access it somewhere, or should I manually write the code to save it to a known location?

Upvotes: 13

Views: 12030

Answers (1)

Mo H.
Mo H.

Reputation: 1818

After digging around a bit I couldn't find a way to actually view the results from the test explorer window run. So the best I can do is give you an alternative.

What you will want to do is run your test using a program called vstest.console.exe, this works almost exactly the same way as running from VS. You can find it under

C:\Program Files(x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsft\TestWindow\vstest.console.exe

run this from your cmd/terminal and set it up as you would like. You can enable logging, files are saved under the the TestResults folder in the same folder listed above, and you should be able to see your results. An example test run would look like:

vstest.console.exe D:\(Path To my Test)\(My Tests dll file).dll  /Settings:D:(Path tO my Tests)\(My Test settings file).testsettings /logger:trx

Upvotes: 11

Related Questions