141 lines
4.9 KiB
Groff
141 lines
4.9 KiB
Groff
.\" Automatically generated by Pandoc 2.1.3
|
|
.\"
|
|
.TH "dotnet vstest command \- .NET Core CLI" "1" "" "" ".NET Core"
|
|
.hy
|
|
.SH dotnet vstest
|
|
.PP
|
|
.SH NAME
|
|
.PP
|
|
\f[C]dotnet\-vstest\f[] \- Runs tests from the specified files.
|
|
.SH SYNOPSIS
|
|
.PP
|
|
\f[C]dotnet\ vstest\ [<TEST_FILE_NAMES>]\ [\-\-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]\ [[\-\-]\ <args>...]]\ [\-?|\-\-Help|/?|/Help]\f[]
|
|
.SH DESCRIPTION
|
|
.PP
|
|
The \f[C]dotnet\-vstest\f[] command runs the \f[C]VSTest.Console\f[] command\-line application to run automated unit and coded UI application tests.
|
|
.SS Arguments
|
|
.PP
|
|
\f[C]TEST_FILE_NAMES\f[]
|
|
.PP
|
|
Run tests from the specified assemblies.
|
|
Separate multiple test assembly names with spaces.
|
|
.SH OPTIONS
|
|
.PP
|
|
\f[C]\-\-Settings|/Settings:<Settings\ File>\f[]
|
|
.PP
|
|
Settings to use when running tests.
|
|
.PP
|
|
\f[C]\-\-Tests|/Tests:<Test\ Names>\f[]
|
|
.PP
|
|
Run tests with names that match the provided values.
|
|
Separate multiple values with commas.
|
|
.PP
|
|
\f[C]\-\-TestAdapterPath|/TestAdapterPath\f[]
|
|
.PP
|
|
Use custom test adapters from a given path (if any) in the test run.
|
|
.PP
|
|
\f[C]\-\-Platform|/Platform:<Platform\ type>\f[]
|
|
.PP
|
|
Target platform architecture used for test execution.
|
|
Valid values are \f[C]x86\f[], \f[C]x64\f[], and \f[C]ARM\f[].
|
|
.PP
|
|
\f[C]\-\-Framework|/Framework:<Framework\ Version>\f[]
|
|
.PP
|
|
Target .NET Framework version used for test execution.
|
|
Examples of valid values are \f[C]\&.NETFramework,Version=v4.6\f[], \f[C]\&.NETCoreApp,Version=v1.0\f[], etc.
|
|
Other supported values are \f[C]Framework35\f[], \f[C]Framework40\f[], \f[C]Framework45\f[], and \f[C]FrameworkCore10\f[].
|
|
.PP
|
|
\f[C]\-\-Parallel|/Parallel\f[]
|
|
.PP
|
|
Execute tests in parallel.
|
|
By default, all available cores on the machine are available for use.
|
|
Set an explicit number of cores with a settings file.
|
|
.PP
|
|
\f[C]\-\-TestCaseFilter|/TestCaseFilter:<Expression>\f[]
|
|
.PP
|
|
Run tests that match the given expression.
|
|
\f[C]<Expression>\f[] is of the format \f[C]<property>Operator<value>[|&<Expression>]\f[], where Operator is one of \f[C]=\f[], \f[C]!=\f[], or \f[C]~\f[].
|
|
Operator \f[C]~\f[] has `contains' semantics and is applicable for string properties like \f[C]DisplayName\f[].
|
|
Parenthesis \f[C]()\f[] are used to group sub\-expressions.
|
|
.PP
|
|
\f[C]\-?|\-\-Help|/?|/Help\f[]
|
|
.PP
|
|
Prints out a short help for the command.
|
|
.PP
|
|
\f[C]\-\-logger|/logger:<Logger\ Uri/FriendlyName>\f[]
|
|
.PP
|
|
Specify a logger for test results.
|
|
.IP \[bu] 2
|
|
To publish test results to Team Foundation Server, use the \f[C]TfsPublisher\f[] 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\ "Any\ CPU">]
|
|
\ \ \ \ [;Flavor=<Defaults\ to\ "Debug">]
|
|
\ \ \ \ [;RunTitle=<title>]
|
|
\f[]
|
|
.fi
|
|
.RE
|
|
.IP \[bu] 2
|
|
To log results to a Visual Studio Test Results File (TRX), use the \f[C]trx\f[] logger provider.
|
|
This switch creates a file in the test results directory with given log file name.
|
|
If \f[C]LogFileName\f[] isn'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[]
|
|
.fi
|
|
.RE
|
|
.PP
|
|
\f[C]\-lt|\-\-ListTests|/lt|/ListTests:<File\ Name>\f[]
|
|
.PP
|
|
Lists discovered tests from the given test container.
|
|
.PP
|
|
\f[C]\-\-ParentProcessId|/ParentProcessId:<ParentProcessId>\f[]
|
|
.PP
|
|
Process Id of the parent process responsible for launching the current process.
|
|
.PP
|
|
\f[C]\-\-Port|/Port:<Port>\f[]
|
|
.PP
|
|
Specifies the port for the socket connection and receiving the event messages.
|
|
.PP
|
|
\f[C]\-\-Diag|/Diag:<Path\ to\ log\ file>\f[]
|
|
.PP
|
|
Enables verbose logs for the test platform.
|
|
Logs are written to the provided file.
|
|
.PP
|
|
\f[C]args\f[]
|
|
.PP
|
|
Specifies extra arguments to pass to the adapter.
|
|
Arguments are specified as name\-value pairs of the form \f[C]<n>=<v>\f[], where \f[C]<n>\f[] is the argument name and \f[C]<v>\f[] is the argument value.
|
|
Use a space to separate multiple arguments.
|
|
.SH EXAMPLES
|
|
.PP
|
|
Run tests in \f[C]mytestproject.dll\f[]:
|
|
.PP
|
|
\f[C]dotnet\ vstest\ mytestproject.dll\f[]
|
|
.PP
|
|
Run tests in \f[C]mytestproject.dll\f[], exporting to custom folder with custom name:
|
|
.PP
|
|
\f[C]dotnet\ vstest\ mytestproject.dll\ \-\-logger:"trx;LogFileName=custom_file_name.trx"\ \-\-ResultsDirectory:custom/file/path\f[]
|
|
.PP
|
|
Run tests in \f[C]mytestproject.dll\f[] and \f[C]myothertestproject.exe\f[]:
|
|
.PP
|
|
\f[C]dotnet\ vstest\ mytestproject.dll\ myothertestproject.exe\f[]
|
|
.PP
|
|
Run \f[C]TestMethod1\f[] tests:
|
|
.PP
|
|
\f[C]dotnet\ vstest\ /Tests:TestMethod1\f[]
|
|
.PP
|
|
Run \f[C]TestMethod1\f[] and \f[C]TestMethod2\f[] tests:
|
|
.PP
|
|
\f[C]dotnet\ vstest\ /Tests:TestMethod1,TestMethod2\f[]
|
|
.SH AUTHORS
|
|
guardrex.
|