This runner supports xUnit.net tests for DNX 4.5.1+, and DNX Core 5+ (this includes ASP.NET 5+).
To install this package, ensure your project.json contains the following lines:
{
"dependencies": {
"xunit": "2.1.0-*",
"xunit.runner.dnx": "2.1.0-*"
},
"commands": {
"test": "xunit.runner.dnx"
}
}
To run tests from the command line, use the following.
# Restore NuGet packages
dnu restore
# Run tests in current directory
dnx test
# Run tests if tests are not in the current directory
dnx -p path/to/project test
For more complete example usage, please see Getting Started with xUnit.net and DNX / ASP.NET 5.