In this section: VSTest allows you to execute tests from projects that use different testing frameworks in a single run. For example, if your Visual Studio solution contains two projects that use two different testing frameworks, NUnit and MSTest, you can run the tests in both projects in one run. VSTest uses framework-specific test adapters to find and execute tests. If the tested scope includes multiple projects that use the same testing framework, ensure that the version of the adapter for this framework is consistent across all the projects. Run one of the following built-in test configurations on the scope of analysis to execute your tests with VSTest: See Configuring Test Configurations for details about specifying a test configuration. Running MSTest Tests with VSTest Your command line may resemble the following: Running tests without collecting coverage information Running tests and collecting coverage information You can execute NUnit Tests by running one of the following built-in configurations: Your command line may resemble the following: Running tests without collecting coverage information Running tests and collecting coverage information All files associated with NUnit integration are shipped in the You can execute NUnit Tests by running one of the following built-in configurations: Run one of the built-in MSTest configurations and extend your dottestcli.exe command to include the build script that invokes The In the above example, dotTEST launches the Running Unit Tests with VSTest
Run VSTest Tests
- executes unit tests in the tested scopeRun VSTest Tests with Coverage
- executes unit tests in the tested scope, and collects coverage informationExamples
dottestcli.exe -solution "C:\Devel\FooSolution\FooSolution.sln" -config "builtin://Run VSTest Tests" -report "C:\Report"
dottestcli.exe -solution "C:\Devel\FooSolution\FooSolution.sln" -config "builtin://Run VSTest Tests with Coverage" -report "C:\Report"
Running NUnit Tests
Run NUnit Tests
- executes NUnit tests in the tested scopeRun NUnit Tests with Coverage
- executes NUnit tests in the tested scope, and collects coverage informationExamples
dottestcli.exe -solution "C:\Devel\FooSolution\FooSolution.sln" -config "builtin://Run NUnit Tests" -report "C:\Report"
dottestcli.exe -solution "C:\Devel\FooSolution\FooSolution.sln" -config "builtin://Run NUnit Tests with Coverage" -report "C:\Report"
[INSTALL_DIR]\integration\NUnit-2.6.3
directory. Running MSTest Tests
Execute MSTests
- executes MSTest tests in the tested scopeExecute MSTests with Coverage
- executes MSTest tests in the tested scope, and collects coverage informationDeploy.exe
in the MSTest integration directory: [INSTALLATION_DIR]\integration\MSTest\Deploy.exe
.mstest.exe
:dottestcli.exe -solution "FooSolution.sln" -config "builtin://Execute MSTests with Coverage" -report "Report" -- "Run_tests.bat"
--
separator indicates the end of the dotTEST command line; arguments following --
from a command line that is invoked by dottestcli.exe
.Run_tests.bat
script and listens to all MSTests executed in the script as it runs. Unit test results are collected and code coverage is measured for FooSolution.sln.
Overview
Content Tools