Command Line Flags
Please note that for the coverage and trx report, you need to install additional extensions
--diagnostic Enable the diagnostic logging. The default log level is 'Trace'. The file will be written in the output directory with the name log_[MMddHHssfff].diag
--diagnostic-filelogger-synchronouswrite Force the built-in file logger to write the log synchronously. Useful for scenario where you don't want to lose any log (i.e. in case of crash). Note that this is slowing down the test execution.
--diagnostic-output-directory Output directory of the diagnostic logging. If not specified the file will be generated inside the default 'TestResults' directory.
--diagnostic-file-prefix Prefix for the log file name that will replace '[log]_.'
--diagnostic-verbosity Define the level of the verbosity for the --diagnostic. The available values are 'Trace', 'Debug', 'Information', 'Warning', 'Error', and 'Critical'.
--exit-on-process-exit Exit the test process if dependent process exits. PID must be provided.
--help Show the command line help.
--ignore-exit-code Do not report non successful exit value for specific exit codes (e.g. '--ignore-exit-code 8;9' ignore exit code 8 and 9 and will return 0 in these case)
--info Display .NET test application information.
--list-tests List available tests.
--log-level Controls framework logging and diagnostic features. The available values are:
- 'Trace' or 'Debug': Enable detailed stack traces, discovery diagnostics, timing details
- 'Information' (default): Normal framework behavior
- 'Warning', 'Error', 'Critical', or 'None': Minimal framework output
--minimum-expected-tests Specifies the minimum number of tests that are expected to run.
--results-directory The directory where the test results are going to be placed. If the specified directory doesn't exist, it's created. The default is TestResults in the directory that contains the test application.
--timeout A global test execution timeout. Takes one argument as string in the format [h|m|s] where 'value' is float.
--coverage Collect the code coverage using dotnet-coverage tool
--coverage-output Output file
--coverage-output-format Output file format. Supported values: 'coverage', 'xml' and 'cobertura'
--coverage-settings XML code coverage settings
--disable-logo Disables the TUnit logo when starting a test session. Can also be set via TUNIT_DISABLE_LOGO environment variable.
--fail-fast Cancel the test run after the first test failure Programmatic equivalent: context.Settings.Execution.FailFast
--maximum-parallel-tests Maximum Parallel Tests Programmatic equivalent: context.Settings.Parallelism.MaximumParallelTests
--no-ansi Disable outputting ANSI escape characters to screen.
--no-progress Disable reporting progress to screen.
--output Controls test result detail level AND real-time console output buffering.
- 'Normal': Show failures only + buffer test output (no real-time spam)
- 'Detailed': Show all tests + real-time test output
Smart defaults: 'Normal' for console environments, 'Detailed' for IDE environments. This prevents console spam while keeping IDEs responsive (each test has its own output window).
--reflection Enable reflection mode for test discovery and execution (defaults to AOT-optimized mode)
--report-trx Enable generating TRX report
--report-trx-filename The name of the generated TRX report
--test-parameter Custom parameters to pass to TUnit
--treenode-filter Use a tree filter to filter down the tests to execute
--github-reporter-style Style for GitHub Actions test reporter output. Valid values are 'collapsible' (default) or 'full'. 'collapsible' wraps detailed test results in expandable HTML blocks. 'full' displays all test details directly.
--detailed-stacktrace Display TUnit internals within stack traces. By default, TUnit frames are hidden to keep failure output focused on user code. Programmatic equivalent: context.Settings.Display.DetailedStackTrace
--output-json Write a JSON report of the test run.
--output-json-filename File name for the JSON report produced by --output-json.
--output-json-prefix File name prefix for the JSON report produced by --output-json.
--report-html (Deprecated) The HTML report is now generated by default. Disable it with the TUNIT_DISABLE_HTML_REPORTER environment variable.
--report-html-filename Path for the HTML test report file (default: TestResults/{AssemblyName}-report.html).
--junit-output-path Path to output JUnit XML file (default: TestResults/{AssemblyName}-junit.xml). The JUnit reporter is also togglable via TUNIT_ENABLE_JUNIT_REPORTER / TUNIT_DISABLE_JUNIT_REPORTER environment variables.