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.
When right-clicking the tab, I don't have the option to Open Containing Folder like I do with other project files.
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?
Press Ctrl+S. Visual Studio prompts you for a location to save the build output.
Use Test Explorer to run unit tests from Visual Studio or third-party unit test projects. You can also use Test Explorer to group tests into categories, filter the test list, and create, save, and run playlists of tests.
By default, Visual Studio builds each project in a solution in its own folder inside the solution. You can change the build output paths of your projects to force all outputs to be placed in the same folder.
To generate unit tests, your types must be public. Open your solution in Visual Studio and then open the class file that has methods you want to test. Right-click on a method and choose Run IntelliTest to generate unit tests for the code in your method. IntelliTest runs your code many times with different inputs.
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
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