Friday, April 13, 2012 2:42 PM
The command line test runner has changed- although MSTest.exe still exists under: C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE, however this exe will fail any tests that use the fakes framework- I don’t think this is the exe that Visual Studio uses now.
There is a new test runner under: C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe.
This exe allows you to execute all tests (including fakes) from the command line. The new runner has similar command line args, but some have been replaced\removed. For example you can specify “/logger:trx” to output a Visual Studio results file.
I couldn’t find a way of specifying the output location for the trx (it just dumps the trx wherever the runner is called from). Does anyone have more info on this?
- Changed Type Nick Black Monday, April 16, 2012 10:48 AM
Saturday, April 14, 2012 7:39 PM
1. Create a run settings file specifying the results directory. For example you can create a settings file with name mysettings.runsettings with following content.
<?xml version="1.0" encoding="UTF-8"?>
</RunSettings>2. Pass the above created run settings file as a command-line argument to vstest.console. This should use the results directory specified in the runsettings file.vstest.console <Testdll> /settings:mysettings.runsettings
- Proposed As Answer by Vicky SongModerator Tuesday, April 17, 2012 6:52 AM
Monday, April 16, 2012 10:51 AM
Thanks for your answer- but even with those settings the trx results file does not get placed in the specified results directory.
I did see some activity in C:\temp during the test when running with those settings- a temporary directory was created but this was cleaned up at the end of the run.
Monday, April 16, 2012 6:19 PM
This issue is fixed post beta, so this can not be done in beta release. For Beta, path to trx can not be changed, it will always be created under current directory.
Tuesday, April 17, 2012 8:50 AMThanks Dhruv- good to know.