dotnet-vstest(1)
π dotnet-vstest β the manual page, but make it cute π
okay bestie, welcome to dotnet-vstest(1) from the .NET Documentation set. this is the gen-z translation, and I promise every single fact survived the vibe check. π«Ά
This article applies to: βοΈ .NET 6 SDK and later versions
π¨ BIG NEWS FIRST, NO CAP: thedotnet vstestcommand is superseded bydotnet test, which can now be used to run assemblies. Seedotnet test. likeβ¦ it still works, but it's giving "still on the group chat but never replies". π
β¨ NAME β¨
dotnet-vstest β runs tests from the specified assemblies. that's it, that's the whole job, and she does it flawlessly. π
πΈ SYNOPSIS πΈ
dotnet vstest [<TEST_FILE_NAMES>] [--Blame] [--Diag <PATH_TO_LOG_FILE>]
[--Framework <FRAMEWORK>] [--InIsolation] [-lt|--ListTests <FILE_NAME>]
[--logger <LOGGER_URI/FRIENDLY_NAME>] [--Parallel]
[--ParentProcessId <PROCESS_ID>] [--Platform] <PLATFORM_TYPE>
[--Port <PORT>] [--ResultsDirectory<PATH>] [--Settings <SETTINGS_FILE>]
[--TestAdapterPath <PATH>] [--TestCaseFilter <EXPRESSION>]
[--Tests <TEST_NAMES>] [[--] <args>...]
dotnet vstest -?|--Help
look at her. brackets everywhere. main character energy fr. π
π¦ DESCRIPTION π¦
The dotnet vstest command runs the VSTest.Console command-line application to run automated unit tests. so like, it's the little launcher that hands your tests over to the actual test runner. iconic behaviour. β¨
π ARGUMENTS π
TEST_FILE_NAMESβ run tests from the specified assemblies. if you've got more than one test assembly, separate the names with spaces. wildcards are supported, so go feral with the*bestie. π₯
π OPTIONS π
--Blameβ runs the tests in blame mode. this one is for when a problematic test keeps crashing the test host and you're like "who did this π". it creates an output file in the current directory calledSequence.xmlthat captures the order of test execution before the crash. detective mode: activated. π΅οΈβοΈ--Diag <PATH_TO_LOG_FILE>β enables verbose logs for the test platform. the logs get written to the file you provide. she's chatty and we love that for her. π¬--Framework <FRAMEWORK>β the target .NET Framework version used for test execution. a valid example value is.NETFramework,Version=v7.0. the other supported values areFramework40,Framework45,FrameworkCore10, andFrameworkUap10. pick your fighter. β--InIsolationβ runs the tests in an isolated process. this makes thevstest.console.exeprocess less likely to get stopped when a test errors out, but heads up: tests may run slower. safety over speed, that's the tradeoff, periodt. π’-lt|--ListTests <FILE_NAME>β lists all discovered tests from the given test container. no running, just β¨ manifesting β¨ a list of what's in there.--logger <LOGGER_URI/FRIENDLY_NAME>β specify a logger for test results. two flavours, both slay:- to publish test results to Team Foundation Server, use the
TfsPublisherlogger provider:
- to publish test results to Team Foundation Server, use the
/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>]
- to log results to a Visual Studio Test Results File (TRX), use the
trxlogger provider. this switch creates a file in the test results directory with the given log file name. ifLogFileNameisn't provided, a unique file name is created to hold the test results. she'll name herself, don't worry. π
/logger:trx [;LogFileName=<Defaults to unique file name>]
--Parallelβ run tests in parallel. by default, all available cores on the machine are available for use. wanna specify an explicit number of cores? set theMaxCpuCountproperty under theRunConfigurationnode in the runsettings file. multitasking queen. π--ParentProcessId <PROCESS_ID>β the process ID of the parent process responsible for launching the current process. family tree, but make it PIDs. π³--Platform <PLATFORM_TYPE>β the target platform architecture used for test execution. valid values arex86,x64, andARM. choose wisely bestie. π―--Port <PORT>β specifies the port for the socket connection and for receiving the event messages. π‘--ResultsDirectory:<PATH>β the test results directory will be created in the specified path if it doesn't already exist. she builds her own home. π--Settings <SETTINGS_FILE>β the settings to use when running tests. π--TestAdapterPath <PATH>β use custom test adapters from a given path (if any) in the test run. bring your own adapter, we stan. π§--TestCaseFilter <EXPRESSION>β run tests that match the given expression.<EXPRESSION>is of the format<property>Operator<value>[|&<EXPRESSION>], whereOperatoris one of=,!=, or~. the~operator hascontainssemantics and is applicable for string properties likeDisplayName. parentheses()are used to group subexpressions. for more information, see TestCase filter (https://github.com/Microsoft/vstest-docs/blob/main/docs/filter.md). filtering is self-care. π--Tests <TEST_NAMES>β run tests with names that match the provided values. separate multiple values with commas. cherry-picking, but legal. π-?|--Helpβ prints out a short help for the command. when in doubt, ask. π@<file>β reads a response file for more options. options, but make it a file. πargsβ specifies extra arguments to pass to the adapter. arguments are specified as name-value pairs of the form<n>=<v>, where<n>is the argument name and<v>is the argument value. use a space to separate multiple arguments. π
π₯ EXAMPLES π₯
run tests in mytestproject.dll:
dotnet vstest mytestproject.dll
run tests in mytestproject.dll, exporting to a custom folder with a custom name:
dotnet vstest mytestproject.dll --logger:"trx;LogFileName=custom_file_name.trx" --ResultsDirectory:custom/file/path
run tests in mytestproject.dll and myothertestproject.exe:
dotnet vstest mytestproject.dll myothertestproject.exe
run TestMethod1 tests:
dotnet vstest /Tests:TestMethod1
run TestMethod1 and TestMethod2 tests:
dotnet vstest /Tests:TestMethod1,TestMethod2
π SEE ALSO π
- VSTest.Console.exe command-line options β go read it, iykyk. π
that's the whole page bestie, no skips, no shortcuts, every flag accounted for. π
sign-off time: this was dotnet-vstest(1) from the .NET Documentation set, dated 2025-10-30. go run your tests, they're gonna eat. π«Άβ¨π
π¦ where this page comes from
- alpine 3.24: dotnet-doc 10.0.303-r2 Β· MIT
- centos-stream 10: dotnet-host 11.0.0~rc.2.26504.105-0.10.el10 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- centos-stream 9: dotnet-host 11.0.0~rc.2.26504.105-0.11.el9 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 43: dotnet-host 10.0.12-1.fc43
- fedora 43: dotnet-host 11.0.0~rc.1.26425.128-0.10.fc43 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 10.0.12-1.fc44
- fedora 44: dotnet-host 10.0.4-1.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 11.0.0~rc.1.26425.128-0.12.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- nixpkgs unstable: dotnet-vmr 11.0.0-rc.3
- ubuntu noble: dotnet-host-10.0 10.0.12-0ubuntu1~24.04.1
- ubuntu questing: dotnet-host-10.0 10.0.9-0ubuntu1~25.10.1
- ubuntu resolute: dotnet-host-10.0 10.0.12-0ubuntu1~26.04.1
- ubuntu resolute: dotnet-host-10.0 10.0.5-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-10.0 10.0.12-0ubuntu2 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc1-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc3-0ubuntu1~26.10.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms