Appendix B. xUnit command-line options

Because of the way the .NET CLI works, it isn’t obvious that it’s possible to specify command-line options when running tests. If you execute dotnet test -?, you’ll only see the help for the dotnet test command. The -? is picked up first by .NET CLI instead of being passed to the xUnit entry point.

To see the command-line options for xUnit, you have to look at the code. I’ve included it here for reference.

Listing B.1. Command-line options for xUnit
Copyright (C) 2015 Outercurve Foundation.

usage: {executableName} <assemblyFile> [configFile] [assemblyFile
     [configFile]...] [options] [reporter]
     [resultFormat ...

Get .NET Core in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.