.\" Automatically generated by Pandoc 2.7.2 .\" .TH "dotnet vstest command" "1" "" "" ".NET Core" .hy .SH dotnet vstest .PP .SH NAME .PP \f[C]dotnet-vstest\f[R] - Runs tests from the specified files. .SH SYNOPSIS .SS .NET Core 2.1 .IP .nf \f[C] dotnet vstest [] [--Settings|/Settings] [--Tests|/Tests] [--TestAdapterPath|/TestAdapterPath] [--Platform|/Platform] [--Framework|/Framework] [--Parallel|/Parallel] [--TestCaseFilter|/TestCaseFilter] [--logger|/logger] [-lt|--ListTests|/lt|/ListTests] [--ParentProcessId|/ParentProcessId] [--Port|/Port] [--Diag|/Diag] [--Blame|/Blame] [--InIsolation|/InIsolation] [[--] ...]] [-?|--Help|/?|/Help] \f[R] .fi .SS .NET Core 2.0 .IP .nf \f[C] dotnet vstest [] [--Settings|/Settings] [--Tests|/Tests] [--TestAdapterPath|/TestAdapterPath] [--Platform|/Platform] [--Framework|/Framework] [--Parallel|/Parallel] [--TestCaseFilter|/TestCaseFilter] [--logger|/logger] [-lt|--ListTests|/lt|/ListTests] [--ParentProcessId|/ParentProcessId] [--Port|/Port] [--Diag|/Diag] [[--] ...]] [-?|--Help|/?|/Help] \f[R] .fi .SS .NET Core 1.x .IP .nf \f[C] dotnet vstest [] [--Settings|/Settings] [--Tests|/Tests] [--TestAdapterPath|/TestAdapterPath] [--Platform|/Platform] [--Framework|/Framework] [--Parallel|/Parallel] [--TestCaseFilter|/TestCaseFilter] [--logger|/logger] [-lt|--ListTests|/lt|/ListTests] [--ParentProcessId|/ParentProcessId] [--Port|/Port] [--Diag|/Diag] [[--] ...]] [-?|--Help|/?|/Help] \f[R] .fi .PP * * * * * .SH DESCRIPTION .PP The \f[C]dotnet-vstest\f[R] command runs the \f[C]VSTest.Console\f[R] command-line application to run automated unit tests. .SS Arguments .PP \f[C]TEST_FILE_NAMES\f[R] .PP Run tests from the specified assemblies. Separate multiple test assembly names with spaces. .SH OPTIONS .SS .NET Core 2.1 .PP \f[C]--Settings|/Settings:\f[R] .PP Settings to use when running tests. .PP \f[C]--Tests|/Tests:\f[R] .PP Run tests with names that match the provided values. Separate multiple values with commas. .PP \f[C]--TestAdapterPath|/TestAdapterPath\f[R] .PP Use custom test adapters from a given path (if any) in the test run. .PP \f[C]--Platform|/Platform:\f[R] .PP Target platform architecture used for test execution. Valid values are \f[C]x86\f[R], \f[C]x64\f[R], and \f[C]ARM\f[R]. .PP \f[C]--Framework|/Framework:\f[R] .PP Target .NET Framework version used for test execution. Examples of valid values are \f[C].NETFramework,Version=v4.6\f[R] or \f[C].NETCoreApp,Version=v1.0\f[R]. Other supported values are \f[C]Framework40\f[R], \f[C]Framework45\f[R], \f[C]FrameworkCore10\f[R], and \f[C]FrameworkUap10\f[R]. .PP \f[C]--Parallel|/Parallel\f[R] .PP Execute tests in parallel. By default, all available cores on the machine are available for use. Specify an explicit number of cores by setting the MaxCpuCount property under the RunConfiguration node in the runsettings file. .PP \f[C]--TestCaseFilter|/TestCaseFilter:\f[R] .PP Run tests that match the given expression. \f[C]\f[R] is of the format \f[C]Operator[|&]\f[R], where Operator is one of \f[C]=\f[R], \f[C]!=\f[R], or \f[C]\[ti]\f[R]. Operator \f[C]\[ti]\f[R] has `contains' semantics and is applicable for string properties like \f[C]DisplayName\f[R]. Parenthesis \f[C]()\f[R] are used to group sub-expressions. .PP \f[C]-?|--Help|/?|/Help\f[R] .PP Prints out a short help for the command. .PP \f[C]--logger|/logger:\f[R] .PP Specify a logger for test results. .IP \[bu] 2 To publish test results to Team Foundation Server, use the \f[C]TfsPublisher\f[R] logger provider: .RS 2 .IP .nf \f[C] /logger:TfsPublisher; Collection=; BuildName=; TeamProject= [;Platform=] [;Flavor=] [;RunTitle=] \f[R] .fi .RE .IP \[bu] 2 To log results to a Visual Studio Test Results File (TRX), use the \f[C]trx\f[R] logger provider. This switch creates a file in the test results directory with given log file name. If \f[C]LogFileName\f[R] isn\[cq]t provided, a unique file name is created to hold the test results. .RS 2 .IP .nf \f[C] /logger:trx [;LogFileName=<Defaults to unique file name>] \f[R] .fi .RE .PP \f[C]-lt|--ListTests|/lt|/ListTests:<File Name>\f[R] .PP Lists all discovered tests from the given test container. .PP \f[C]--ParentProcessId|/ParentProcessId:<ParentProcessId>\f[R] .PP Process ID of the parent process responsible for launching the current process. .PP \f[C]--Port|/Port:<Port>\f[R] .PP Specifies the port for the socket connection and receiving the event messages. .PP \f[C]--Diag|/Diag:<Path to log file>\f[R] .PP Enables verbose logs for the test platform. Logs are written to the provided file. .PP \f[C]--Blame|/Blame\f[R] .PP Runs the tests in blame mode. This option is helpful in isolating the problematic tests causing test host to crash. It creates an output file in the current directory as \f[I]Sequence.xml\f[R] that captures the order of tests execution before the crash. .PP \f[C]--InIsolation|/InIsolation\f[R] .PP Runs the tests in an isolated process. This makes \f[I]vstest.console.exe\f[R] process less likely to be stopped on an error in the tests, but tests may run slower. .PP \f[C]\[at]<file>\f[R] .PP Reads response file for more options. .PP \f[C]args\f[R] .PP Specifies extra arguments to pass to the adapter. Arguments are specified as name-value pairs of the form \f[C]<n>=<v>\f[R], where \f[C]<n>\f[R] is the argument name and \f[C]<v>\f[R] is the argument value. Use a space to separate multiple arguments. .SS .NET Core 2.0 .PP \f[C]--Settings|/Settings:<Settings File>\f[R] .PP Settings to use when running tests. .PP \f[C]--Tests|/Tests:<Test Names>\f[R] .PP Run tests with names that match the provided values. Separate multiple values with commas. .PP \f[C]--TestAdapterPath|/TestAdapterPath\f[R] .PP Use custom test adapters from a given path (if any) in the test run. .PP \f[C]--Platform|/Platform:<Platform type>\f[R] .PP Target platform architecture used for test execution. Valid values are \f[C]x86\f[R], \f[C]x64\f[R], and \f[C]ARM\f[R]. .PP \f[C]--Framework|/Framework:<Framework Version>\f[R] .PP Target .NET Framework version used for test execution. Examples of valid values are \f[C].NETFramework,Version=v4.6\f[R] or \f[C].NETCoreApp,Version=v1.0\f[R]. Other supported values are \f[C]Framework40\f[R], \f[C]Framework45\f[R], and \f[C]FrameworkCore10\f[R]. .PP \f[C]--Parallel|/Parallel\f[R] .PP Execute tests in parallel. By default, all available cores on the machine are available for use. Specify an explicit number of cores by setting the MaxCpuCount property under the RunConfiguration node in the runsettings file. .PP \f[C]--TestCaseFilter|/TestCaseFilter:<Expression>\f[R] .PP Run tests that match the given expression. \f[C]<Expression>\f[R] is of the format \f[C]<property>Operator<value>[|&<Expression>]\f[R], where Operator is one of \f[C]=\f[R], \f[C]!=\f[R], or \f[C]\[ti]\f[R]. Operator \f[C]\[ti]\f[R] has `contains' semantics and is applicable for string properties like \f[C]DisplayName\f[R]. Parenthesis \f[C]()\f[R] are used to group sub-expressions. .PP \f[C]-?|--Help|/?|/Help\f[R] .PP Prints out a short help for the command. .PP \f[C]--logger|/logger:<Logger Uri/FriendlyName>\f[R] .PP Specify a logger for test results. .IP \[bu] 2 To publish test results to Team Foundation Server, use the \f[C]TfsPublisher\f[R] logger provider: .RS 2 .IP .nf \f[C] /logger:TfsPublisher; Collection=<team project collection url>; BuildName=<build name>; TeamProject=<team project name> [;Platform=<Defaults to \[dq]Any CPU\[dq]>] [;Flavor=<Defaults to \[dq]Debug\[dq]>] [;RunTitle=<title>] \f[R] .fi .RE .IP \[bu] 2 To log results to a Visual Studio Test Results File (TRX), use the \f[C]trx\f[R] logger provider. This switch creates a file in the test results directory with given log file name. If \f[C]LogFileName\f[R] isn\[cq]t provided, a unique file name is created to hold the test results. .RS 2 .IP .nf \f[C] /logger:trx [;LogFileName=<Defaults to unique file name>] \f[R] .fi .RE .PP \f[C]-lt|--ListTests|/lt|/ListTests:<File Name>\f[R] .PP Lists all discovered tests from the given test container. .PP \f[C]--ParentProcessId|/ParentProcessId:<ParentProcessId>\f[R] .PP Process ID of the parent process responsible for launching the current process. .PP \f[C]--Port|/Port:<Port>\f[R] .PP Specifies the port for the socket connection and receiving the event messages. .PP \f[C]--Diag|/Diag:<Path to log file>\f[R] .PP Enables verbose logs for the test platform. Logs are written to the provided file. .PP \f[C]args\f[R] .PP Specifies extra arguments to pass to the adapter. Arguments are specified as name-value pairs of the form \f[C]<n>=<v>\f[R], where \f[C]<n>\f[R] is the argument name and \f[C]<v>\f[R] is the argument value. Use a space to separate multiple arguments. .SS .NET Core 1.x .PP \f[C]--Settings|/Settings:<Settings File>\f[R] .PP Settings to use when running tests. .PP \f[C]--Tests|/Tests:<Test Names>\f[R] .PP Run tests with names that match the provided values. Separate multiple values with commas. .PP \f[C]--TestAdapterPath|/TestAdapterPath\f[R] .PP Use custom test adapters from a given path (if any) in the test run. .PP \f[C]--Platform|/Platform:<Platform type>\f[R] .PP Target platform architecture used for test execution. Valid values are \f[C]x86\f[R], \f[C]x64\f[R], and \f[C]ARM\f[R]. .PP \f[C]--Framework|/Framework:<Framework Version>\f[R] .PP Target .NET Framework version used for test execution. Examples of valid values are \f[C].NETFramework,Version=v4.6\f[R] or \f[C].NETCoreApp,Version=v1.0\f[R]. Other supported values are \f[C]Framework40\f[R], \f[C]Framework45\f[R], and \f[C]FrameworkCore10\f[R]. .PP \f[C]--Parallel|/Parallel\f[R] .PP Execute tests in parallel. By default, all available cores on the machine are available for use. Specify an explicit number of cores by setting the MaxCpuCount property under the RunConfiguration node in the runsettings file. .PP \f[C]--TestCaseFilter|/TestCaseFilter:<Expression>\f[R] .PP Run tests that match the given expression. \f[C]<Expression>\f[R] is of the format \f[C]<property>Operator<value>[|&<Expression>]\f[R], where Operator is one of \f[C]=\f[R], \f[C]!=\f[R], or \f[C]\[ti]\f[R]. Operator \f[C]\[ti]\f[R] has `contains' semantics and is applicable for string properties like \f[C]DisplayName\f[R]. Parenthesis \f[C]()\f[R] are used to group sub-expressions. .PP \f[C]-?|--Help|/?|/Help\f[R] .PP Prints out a short help for the command. .PP \f[C]--logger|/logger:<Logger Uri/FriendlyName>\f[R] .PP Specify a logger for test results. .IP \[bu] 2 To publish test results to Team Foundation Server, use the \f[C]TfsPublisher\f[R] logger provider: .RS 2 .IP .nf \f[C] /logger:TfsPublisher; Collection=<team project collection url>; BuildName=<build name>; TeamProject=<team project name> [;Platform=<Defaults to \[dq]Any CPU\[dq]>] [;Flavor=<Defaults to \[dq]Debug\[dq]>] [;RunTitle=<title>] \f[R] .fi .RE .IP \[bu] 2 To log results to a Visual Studio Test Results File (TRX), use the \f[C]trx\f[R] logger provider. This switch creates a file in the test results directory with given log file name. If \f[C]LogFileName\f[R] isn\[cq]t provided, a unique file name is created to hold the test results. .RS 2 .IP .nf \f[C] /logger:trx [;LogFileName=<Defaults to unique file name>] \f[R] .fi .RE .PP \f[C]-lt|--ListTests|/lt|/ListTests:<File Name>\f[R] .PP Lists all discovered tests from the given test container. .PP \f[C]--ParentProcessId|/ParentProcessId:<ParentProcessId>\f[R] .PP Process ID of the parent process responsible for launching the current process. .PP \f[C]--Port|/Port:<Port>\f[R] .PP Specifies the port for the socket connection and receiving the event messages. .PP \f[C]--Diag|/Diag:<Path to log file>\f[R] .PP Enables verbose logs for the test platform. Logs are written to the provided file. .PP \f[C]args\f[R] .PP Specifies extra arguments to pass to the adapter. Arguments are specified as name-value pairs of the form \f[C]<n>=<v>\f[R], where \f[C]<n>\f[R] is the argument name and \f[C]<v>\f[R] is the argument value. Use a space to separate multiple arguments. .PP * * * * * .SH EXAMPLES .PP Run tests in \f[C]mytestproject.dll\f[R]: .PP \f[C]dotnet vstest mytestproject.dll\f[R] .PP Run tests in \f[C]mytestproject.dll\f[R], exporting to custom folder with custom name: .PP \f[C]dotnet vstest mytestproject.dll --logger:\[dq]trx;LogFileName=custom_file_name.trx\[dq] --ResultsDirectory:custom/file/path\f[R] .PP Run tests in \f[C]mytestproject.dll\f[R] and \f[C]myothertestproject.exe\f[R]: .PP \f[C]dotnet vstest mytestproject.dll myothertestproject.exe\f[R] .PP Run \f[C]TestMethod1\f[R] tests: .PP \f[C]dotnet vstest /Tests:TestMethod1\f[R] .PP Run \f[C]TestMethod1\f[R] and \f[C]TestMethod2\f[R] tests: .PP \f[C]dotnet vstest /Tests:TestMethod1,TestMethod2\f[R] .SH AUTHORS mairaw.