VS2010 supports MSTest from the command line: ``` C:\Projects\VS2010TestProjectExample>"c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /testcontainer:Debug\DefaultTest.dll Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved. Loading Debug\DefaultTest.dll... Starting execution... Results Top Level Tests ------- --------------- Failed UnitTest1.?A0x0bae6f70.C_A_T_C_H____T_E_S_T____C_L_A_S_S___10_1.C_A_T_C_H___M_E_T_H_O_D___10_1 Passed UnitTest1.?A0x0bae6f70.C_A_T_C_H____T_E_S_T____C_L_A_S_S___6_0.C_A_T_C_H___M_E_T_H_O_D___6_0 1/2 test(s) Passed, 1 Failed Summary ------- Test Run Failed. Failed 1 Passed 1 --------- Total 2 Results file: C:\Projects\VS2010TestProjectExample\TestResults\user_machine 2013-11-18 21_43_26.trx Test Settings: Default Test Settings ``` which gives the following output in the .trx file: ``` My first failing catch test in VS2010 Description My first failing catch test in VS2010 My first catch test in VS2010 Description My first catch test in VS2010 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Using Catch v1.0 b13 for a managed MSTest project. ------------------------------------------------------------------------------- My first failing catch test in VS2010 ------------------------------------------------------------------------------- UnitTest1.cpp(10) ............................................................................... UnitTest1.cpp(12): FAILED: REQUIRE( false ) =============================================================================== 0 test cases - all failed Assert.Fail failed. REQUIRE( false ), at UnitTest1.?A0x0bae6f70.C_A_T_C_H____T_E_S_T____10_1() in c:\projects\vs2010testprojectexample\vs2010testprojectexample\unittest1.cpp:line 12 at Catch.FreeFunctionTestCase.invoke(FreeFunctionTestCase* ) in c:\projects\phil\catch\include\internal\catch_vs_test_registry.hpp:line 32 at Catch.TestCase.invoke(TestCase* ) in c:\projects\phil\catch\include\internal\catch_test_case_info.hpp:line 78 at Catch.RunContext.runCurrentTest(RunContext* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* redirectedCout, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* redirectedCerr) in c:\projects\phil\catch\include\internal\catch_runner_impl.hpp:line 282 at Catch.RunContext.runTest(RunContext* , Totals* , TestCase* testCase) in c:\projects\phil\catch\include\internal\catch_runner_impl.hpp:line 122 at UnitTest1.?A0x0bae6f70.C_A_T_C_H____T_E_S_T____C_L_A_S_S___10_1.C_A_T_C_H___M_E_T_H_O_D___10_1() in c:\projects\vs2010testprojectexample\vs2010testprojectexample\unittest1.cpp:line 10 ``` --- [Home](../../README.md)