TheoryData
to support up to 10 data parameters.-stoponfail
switch to stop running tests after the first test failure.-msbuildverbosity
switch to allow the user to choose which verbosity
level to use when invoking msbuild.exe
or dotnet msbuild
. This value
defaults to minimal
, which was previously the hardcoded value.
1.0.4
) and run with that framework. The user can still override this default
choice by passing the -fxversion
switch.
-stoponfail
switch to stop running tests after the first test failure..deps.json
file to dotnet exec
, as this file is discovered automatically now. As a result, you can
invoke the console runner with multiple tests assemblies, as follows:
dotnet /path/to/xunit.console.dll /path/to/tests1.dll /path/to/tests2.dll
You will commonly find xunit.console.dll
in the NuGet package cache (for example,
C:\Users\MyUsername\.NuGet\packages
), or if you're inside a project that takes a
package reference to xunit.runner.console
, you can use the MSBuild property
$(XunitConsoleNetCoreAppPath)
(for .NET Core 1.x) or
$(XunitConsoleNetCore2AppPath)
(for .NET Core 2.x). For an example, please see the
console
runner integration test project.
StopOnFail
attribute to stop running tests after the first test failure.<Exec>
task to run dotnet xunit
or dotnet test
, or to add targets
to your .csproj
files that can directly invoke the console runner.
For an example, please see the
console
runner integration test project.
NetCoreAssemblyDependencyResolver
class was added which can be
used by runner authors to provide support for loading dependencies of test assemblies
by reading the .deps.json
file that's generated, and resolving those
dependencies from the user's local NuGet cache. To use it, call its constructor
with the full path to the test assembly on disk, just before creating the controller
(for example, XunitFrontController
). The object is disposable, so placing
it inside a using
block is strongly advised. For an example, please see
ConsoleRunner.cs
in the console runner.
sbyte
and Nullable<sbyte>
as serializable types.MemberDataAttributeBase
can support data that is expressed as the non-generic
IEnumerable
, in addition to the generic IEnumerable<T>
.
xunit.console
NuGet package. Unlike the runner package (xunit.runner.console
),
this contains the .NET Core console runner as a linkable library, to be consume by developers who
wish to write a simple console runner that wraps the existing console runner.
For information on using xUnit.net from within Visual Studio, see Running tests with Visual Studio in the Getting Started documentation.