From bc9407e9122dd8cef6842eda8aa0d77841b07d80 Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Mon, 13 Jul 2026 16:29:54 +0200 Subject: [PATCH 01/11] Fix vstest docs links and runsettings CLI guidance Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e840b63-ad95-40c2-9ef8-5f2fcc4cfdaa --- ...t-tests-by-using-a-dot-runsettings-file.md | 30 ++++++++++++++++++- docs/test/vstest-console-options.md | 8 ++--- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md b/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md index e7e74b989c8..b0ce7048874 100644 --- a/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md +++ b/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md @@ -1,7 +1,7 @@ --- title: Configure unit tests with a .runsettings file description: Learn how to use the .runsettings file in Visual Studio to configure unit tests that are run from the command line, from the IDE, or in a build workflow. -ms.date: 12/17/2025 +ms.date: 07/13/2026 ms.topic: how-to ms.author: mikejo @@ -150,6 +150,34 @@ To run tests from the command line, use *vstest.console.exe*, and specify the se For more information, see [VSTest.Console.exe command-line options](vstest-console-options.md). +## Override run settings from the command line + +You can also override some run settings directly from the command line. Specify run settings as name-value pairs after `--`. Include the space after `--`; all arguments after `--` are treated as run settings overrides, so these arguments must be last. Command-line run settings overrides take precedence over values from a file passed with `--settings`. + +```cmd +dotnet test -- MSTest.MapInconclusiveToFailed=True MSTest.DeploymentEnabled=False +``` + +Starting with the .NET SDK 5.0, you can set **TestRunParameters** from the command line: + +```cmd +dotnet test -- TestRunParameters.Parameter(name="myParam", value="value") +``` + +Shell quoting rules differ. In Command Prompt, escape quotation marks as needed. In PowerShell 7.3 and later, native command argument handling supports this syntax more directly; in earlier PowerShell versions, or when `$PSNativeCommandArgumentPassing` is set to `legacy`, use the `--%` stop-parsing token. In Bash, escape characters such as parentheses, quotation marks, spaces, and semicolons. + +Parameter values can contain semicolons and other special characters, such as connection strings, but the shell must pass them through literally. For complex values, consider using a *.runsettings* file instead: + +```xml + + + + + +``` + +For more command-line examples and shell-specific quoting details, see [Passing runsettings arguments through commandline](https://github.com/microsoft/vstest/blob/main/docs/RunSettingsArguments.md). + ## The *.runsettings file The *.runsettings file is an XML file that contains different configuration elements within the **RunSettings** element. The sections that follow detail the different elements. For a complete sample, see [Example *.runsettings file](#example-runsettings-file). diff --git a/docs/test/vstest-console-options.md b/docs/test/vstest-console-options.md index f4223c3ec17..ceaabe36ed3 100644 --- a/docs/test/vstest-console-options.md +++ b/docs/test/vstest-console-options.md @@ -1,7 +1,7 @@ --- title: VSTest.Console.exe command-line options description: Learn about the VSTest.Console.exe command-line tool that runs tests. This article includes the General command-line options. -ms.date: 02/28/2025 +ms.date: 07/13/2026 ms.topic: reference helpviewer_keywords: - vstest.console.exe @@ -38,7 +38,7 @@ The following table lists all the options for *VSTest.Console.exe* and short des |**/TestAdapterPath:[*path*]**|Forces the *vstest.console.exe* process to use custom test adapters from a specified path (if any) in the test run.
Example: `/TestAdapterPath:[pathToCustomAdapters]`| |**/Platform:[*platform type*]**|Forces the given platform to be used, instead of the platform determined from the current runtime. This option is able to force only x86, and x64 platforms on Windows. The ARM option is broken and will result in x64 on most systems.
Do NOT specify this option to run on runtimes that aren't in the list of valid values such as ARM64.
Valid values are x86, x64, and ARM.
|**/Framework: [*framework version*]**|Target .NET version to be used for test execution.
Example values are `Framework35`, `Framework40`, `Framework45`, `FrameworkUap10`, `.NETCoreApp,Version=v1.1`.
TargetFrameworkAttribute is used to automatically detect this option from your assembly, and defaults to `Framework40` when the attribute isn't present. You must specify this option explicitly if you remove the [TargetFrameworkAttribute](/dotnet/api/system.runtime.versioning.targetframeworkattribute) from your .NET Core assemblies.
If the target framework is specified as **Framework35**, the tests run in CLR 4.0 "compatibility mode".
Example: `/Framework:framework40`| -|**/TestCaseFilter:[*expression*]**|Run tests that match the given expression.
is of the format =[\|].
Example: `/TestCaseFilter:"Priority=1"`
Example: `/TestCaseFilter:"TestCategory=Nightly|FullyQualifiedName=Namespace.ClassName.MethodName"`
The **/TestCaseFilter** command-line option can't be used with the **/Tests** command-line option.
For information about creating and using expressions, see [TestCase filter](https://github.com/Microsoft/vstest-docs/blob/main/docs/filter.md).| +|**/TestCaseFilter:[*expression*]**|Run tests that match the given expression.
is of the format =[\|].
Example: `/TestCaseFilter:"Priority=1"`
Example: `/TestCaseFilter:"TestCategory=Nightly|FullyQualifiedName=Namespace.ClassName.MethodName"`
The **/TestCaseFilter** command-line option can't be used with the **/Tests** command-line option.
For information about creating and using expressions, see [TestCase filter](https://github.com/microsoft/vstest/blob/main/docs/filter.md).| |**/?**|Displays usage information.| |**/Logger:[*uri/friendlyname*]**|Specify a logger for test results. Specify the parameter multiple times to enable multiple loggers.
Example: To log results into a Visual Studio Test Results File (TRX), use
**/Logger:trx**
**[;LogFileName=\]**
For more information, see [Logging example](#logging-example).| |**/ListTests:[*file name*]**|Lists discovered tests from the given test container.
Note: The `/TestCaseFilters` option has no effect when listing tests; it only controls which tests get run.| @@ -46,12 +46,12 @@ The following table lists all the options for *VSTest.Console.exe* and short des |**/ListExecutors**|Lists installed test executors.| |**/ListLoggers**|Lists installed test loggers.| |**/ListSettingsProviders**|Lists installed test settings providers.| -|**/Blame**|Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash. When a crash is detected, it creates a sequence file in `TestResults//_Sequence.xml` that captures the order of tests that were run before the crash. For more information, see [Blame data collector](https://github.com/Microsoft/vstest-docs/blob/main/docs/extensions/blame-datacollector.md).| +|**/Blame**|Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash. When a crash is detected, it creates a sequence file in `TestResults//_Sequence.xml` that captures the order of tests that were run before the crash. For more information, see [Blame data collector](https://github.com/microsoft/vstest/blob/main/docs/extensions/blame-datacollector.md).| |**/Diag:[*file name*]**|Writes diagnostic trace logs to the specified file.| |**/ResultsDirectory:[*path*]**|Test results directory will be created in specified path if not exists.
Example: `/ResultsDirectory:`| |**/ParentProcessId:[*parentProcessId*]**|Process ID of the Parent Process responsible for launching current process.| |**/Port:[*port*]**|The Port for socket connection and receiving the event messages.| -|**/Collect:[*dataCollector friendlyName*]**|Enables data collector for the test run. [More information](https://github.com/Microsoft/vstest-docs/blob/main/docs/analyze.md).| +|**/Collect:[*dataCollector friendlyName*]**|Enables data collector for the test run. [More information](https://github.com/microsoft/vstest/blob/main/docs/analyze.md).| > [!TIP] > The options and values aren't case-sensitive. From 493e7a23bcb73acbfb806c8ba372c432d28e6d69 Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Mon, 13 Jul 2026 17:21:08 +0200 Subject: [PATCH 02/11] Add link to vstest logger catalog and authoring guide (Topic 5) Cross-reference microsoft/vstest report.md for the full list of built-in and community test loggers and instructions for authoring a logger. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e840b63-ad95-40c2-9ef8-5f2fcc4cfdaa --- docs/test/vstest-console-options.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/test/vstest-console-options.md b/docs/test/vstest-console-options.md index ceaabe36ed3..b1831d8c4f8 100644 --- a/docs/test/vstest-console-options.md +++ b/docs/test/vstest-console-options.md @@ -119,6 +119,8 @@ In PowerShell, you need to use quotes: vstest.console.exe myTestFile.dll /logger:"console;verbosity=detailed" ``` +For the full list of available loggers — including the built-in console, TRX, and HTML loggers and community loggers for xUnit, NUnit, JUnit, AppVeyor, Azure Pipelines, GitHub Actions, and TeamCity — as well as instructions for authoring your own logger, see [Reporting test results](https://github.com/microsoft/vstest/blob/main/docs/report.md) in the vstest repository. + ## UWP example For UWP, the appxrecipe file must be referenced instead of a DLL. From b7ccf2622a07a7dd35176fe2952332fd79b1e783 Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Tue, 14 Jul 2026 12:37:06 +0200 Subject: [PATCH 03/11] Use vstest.console.exe examples on the vstest.console runsettings page The command-line override section is introduced with vstest.console.exe but used dotnet test examples. vstest.console.exe supports the same -- name=value inline runsettings override natively (CliRunSettingsArgumentProcessor), so show the vstest.console.exe form to match the page's context, and note dotnet test uses the same syntax. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e840b63-ad95-40c2-9ef8-5f2fcc4cfdaa --- ...igure-unit-tests-by-using-a-dot-runsettings-file.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md b/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md index b0ce7048874..d5287329af3 100644 --- a/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md +++ b/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md @@ -152,16 +152,18 @@ For more information, see [VSTest.Console.exe command-line options](vstest-conso ## Override run settings from the command line -You can also override some run settings directly from the command line. Specify run settings as name-value pairs after `--`. Include the space after `--`; all arguments after `--` are treated as run settings overrides, so these arguments must be last. Command-line run settings overrides take precedence over values from a file passed with `--settings`. +You can also override some run settings directly from the command line. Specify run settings as name-value pairs after `--`. Include the space after `--`; all arguments after `--` are treated as run settings overrides, so these arguments must be last. Command-line run settings overrides take precedence over values from a file passed with `/Settings`. ```cmd -dotnet test -- MSTest.MapInconclusiveToFailed=True MSTest.DeploymentEnabled=False +vstest.console.exe test.dll -- MSTest.MapInconclusiveToFailed=True MSTest.DeploymentEnabled=False ``` -Starting with the .NET SDK 5.0, you can set **TestRunParameters** from the command line: +The same syntax works with `dotnet test` (use `dotnet test -- MSTest.MapInconclusiveToFailed=True`). + +You can set **TestRunParameters** from the command line: ```cmd -dotnet test -- TestRunParameters.Parameter(name="myParam", value="value") +vstest.console.exe test.dll -- TestRunParameters.Parameter(name="myParam", value="value") ``` Shell quoting rules differ. In Command Prompt, escape quotation marks as needed. In PowerShell 7.3 and later, native command argument handling supports this syntax more directly; in earlier PowerShell versions, or when `$PSNativeCommandArgumentPassing` is set to `legacy`, use the `--%` stop-parsing token. In Bash, escape characters such as parentheses, quotation marks, spaces, and semicolons. From bc282e7cb9e0bb2683e08597be4fda74471e55f5 Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Tue, 14 Jul 2026 17:00:39 +0200 Subject: [PATCH 04/11] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../configure-unit-tests-by-using-a-dot-runsettings-file.md | 4 ++-- docs/test/vstest-console-options.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md b/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md index d5287329af3..162ab578cb2 100644 --- a/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md +++ b/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md @@ -152,7 +152,7 @@ For more information, see [VSTest.Console.exe command-line options](vstest-conso ## Override run settings from the command line -You can also override some run settings directly from the command line. Specify run settings as name-value pairs after `--`. Include the space after `--`; all arguments after `--` are treated as run settings overrides, so these arguments must be last. Command-line run settings overrides take precedence over values from a file passed with `/Settings`. +You can also override some run settings directly from the command line. Specify run settings overrides after `--`. Include the space after `--`; all arguments after `--` are treated as run settings overrides, so these arguments must be last. Command-line run settings overrides take precedence over values from a file passed with `/Settings`. ```cmd vstest.console.exe test.dll -- MSTest.MapInconclusiveToFailed=True MSTest.DeploymentEnabled=False @@ -178,7 +178,7 @@ Parameter values can contain semicolons and other special characters, such as co ``` -For more command-line examples and shell-specific quoting details, see [Passing runsettings arguments through commandline](https://github.com/microsoft/vstest/blob/main/docs/RunSettingsArguments.md). +For more command-line examples and shell-specific quoting details, see [Passing runsettings arguments through the command line](https://github.com/microsoft/vstest/blob/main/docs/RunSettingsArguments.md). ## The *.runsettings file diff --git a/docs/test/vstest-console-options.md b/docs/test/vstest-console-options.md index b1831d8c4f8..d0503767c36 100644 --- a/docs/test/vstest-console-options.md +++ b/docs/test/vstest-console-options.md @@ -119,7 +119,7 @@ In PowerShell, you need to use quotes: vstest.console.exe myTestFile.dll /logger:"console;verbosity=detailed" ``` -For the full list of available loggers — including the built-in console, TRX, and HTML loggers and community loggers for xUnit, NUnit, JUnit, AppVeyor, Azure Pipelines, GitHub Actions, and TeamCity — as well as instructions for authoring your own logger, see [Reporting test results](https://github.com/microsoft/vstest/blob/main/docs/report.md) in the vstest repository. +For the full list of available loggers, as well as instructions for authoring your own logger, see [Reporting test results](https://github.com/microsoft/vstest/blob/main/docs/report.md) in the vstest repository. ## UWP example From 04ba0c2bc778fffa7e6c64158b4c182dde7d65ee Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Wed, 15 Jul 2026 22:38:16 +0200 Subject: [PATCH 05/11] Add zsh shell quoting rules for runsettings command-line overrides Address PR review feedback: document unix shell (zsh) escaping rules for the `TestRunParameters.Parameter(...)` override syntax, using zsh as the macOS default-shell example. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0cc38362-9c3b-46eb-8142-9c49c63dc4a0 --- ...onfigure-unit-tests-by-using-a-dot-runsettings-file.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md b/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md index 162ab578cb2..1f25235561b 100644 --- a/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md +++ b/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md @@ -1,7 +1,7 @@ --- title: Configure unit tests with a .runsettings file description: Learn how to use the .runsettings file in Visual Studio to configure unit tests that are run from the command line, from the IDE, or in a build workflow. -ms.date: 07/13/2026 +ms.date: 07/15/2026 ms.topic: how-to ms.author: mikejo @@ -168,6 +168,12 @@ vstest.console.exe test.dll -- TestRunParameters.Parameter(name="myParam", value Shell quoting rules differ. In Command Prompt, escape quotation marks as needed. In PowerShell 7.3 and later, native command argument handling supports this syntax more directly; in earlier PowerShell versions, or when `$PSNativeCommandArgumentPassing` is set to `legacy`, use the `--%` stop-parsing token. In Bash, escape characters such as parentheses, quotation marks, spaces, and semicolons. +In zsh (the default shell on macOS), use the same escaping as Bash: escape quotation marks, spaces, and semicolons. Because zsh also treats unquoted parentheses as globbing and array syntax, always escape or quote the parentheses in `TestRunParameters.Parameter(...)`. For example: + +```zsh +vstest.console.exe test.dll -- TestRunParameters.Parameter\(name=\"myParam\",\ value=\"value\"\) +``` + Parameter values can contain semicolons and other special characters, such as connection strings, but the shell must pass them through literally. For complex values, consider using a *.runsettings* file instead: ```xml From ee7ce6856e078f80a3935b2ac6adbfb39fc91e9f Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Fri, 17 Jul 2026 12:28:39 +0200 Subject: [PATCH 06/11] Update remaining archived vstest-docs links to maintained microsoft/vstest repo The microsoft/vstest-docs repository is archived. Repoint the last two cross-references (configure.md and RFC 0023) to the maintained microsoft/vstest repository, matching its docs/ path layout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0cc38362-9c3b-46eb-8142-9c49c63dc4a0 --- .../configure-unit-tests-by-using-a-dot-runsettings-file.md | 2 +- docs/test/migrate-testsettings-to-runsettings.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md b/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md index 1f25235561b..40fcd7c3764 100644 --- a/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md +++ b/docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md @@ -547,6 +547,6 @@ The **RunConfiguration** node should contain an **EnvironmentVariables** node. A ## Related content -- [Configure a test run](https://github.com/microsoft/vstest-docs/blob/main/docs/configure.md) +- [Configure a test run](https://github.com/microsoft/vstest/blob/main/docs/configure.md) - [Customize code coverage analysis](../test/customizing-code-coverage-analysis.md) - [Visual Studio test task (Azure Test Plans)](/azure/devops/pipelines/tasks/test/vstest?view=vsts&preserve-view=true) diff --git a/docs/test/migrate-testsettings-to-runsettings.md b/docs/test/migrate-testsettings-to-runsettings.md index 280056f1585..37842b0ef5c 100644 --- a/docs/test/migrate-testsettings-to-runsettings.md +++ b/docs/test/migrate-testsettings-to-runsettings.md @@ -1,7 +1,7 @@ --- title: Migrate testsettings to runsettings description: Learn how to migrate testsettings to runsettings -ms.date: 03/18/2021 +ms.date: 07/17/2026 ms.topic: upgrade-and-migration-article f1_keywords: - vs.UnitTest.Migrate @@ -34,7 +34,7 @@ SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings ``` -If you're interested in reading more on how the *.testsettings* options convert to *.runsettings* you can find more implementation details in the [open source test platform repository](https://github.com/microsoft/vstest-docs/blob/main/RFCs/0023-TestSettings-Deprecation.md#migration) on GitHub. +If you're interested in reading more on how the *.testsettings* options convert to *.runsettings* you can find more implementation details in the [open source test platform repository](https://github.com/microsoft/vstest/blob/main/docs/RFCs/0023-TestSettings-Deprecation.md#migration) on GitHub. ## Related content From d13df7fad862f2937adef33ebe056af6c0b23d2e Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Fri, 17 Jul 2026 12:31:53 +0200 Subject: [PATCH 07/11] Enrich vstest.console CLI reference: exit codes, filter escaping, blame dumps, option gaps Reconciled against the maintained microsoft/vstest repo docs: - Add an Exit codes section (0/1 semantics, no-tests-found warning + TreatNoTestsAsError). - Add shell escaping guidance for /TestCaseFilter (PowerShell comma/semicolon, bash/zsh ! and generic-type args). - Expand /Blame with crash/hang dump options and dotnet test equivalents. - Fill option gaps: /Environment (+/e), @response file, short forms (/lt), modern /Framework monikers, /Diag tracelevel, /Logger LogFilePrefix. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0cc38362-9c3b-46eb-8142-9c49c63dc4a0 --- docs/test/vstest-console-options.md | 44 ++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/docs/test/vstest-console-options.md b/docs/test/vstest-console-options.md index d0503767c36..3341cebb28d 100644 --- a/docs/test/vstest-console-options.md +++ b/docs/test/vstest-console-options.md @@ -1,7 +1,7 @@ --- title: VSTest.Console.exe command-line options description: Learn about the VSTest.Console.exe command-line tool that runs tests. This article includes the General command-line options. -ms.date: 07/13/2026 +ms.date: 07/17/2026 ms.topic: reference helpviewer_keywords: - vstest.console.exe @@ -37,21 +37,23 @@ The following table lists all the options for *VSTest.Console.exe* and short des |**/UseVsixExtensions**|This option makes the *vstest.console.exe* process use or skip the VSIX extensions installed (if any) in the test run.
This option is deprecated. Starting from the next major release of Visual Studio this option may be removed. Move to consuming extensions made available as a NuGet package.
Example: `/UseVsixExtensions:true`| |**/TestAdapterPath:[*path*]**|Forces the *vstest.console.exe* process to use custom test adapters from a specified path (if any) in the test run.
Example: `/TestAdapterPath:[pathToCustomAdapters]`| |**/Platform:[*platform type*]**|Forces the given platform to be used, instead of the platform determined from the current runtime. This option is able to force only x86, and x64 platforms on Windows. The ARM option is broken and will result in x64 on most systems.
Do NOT specify this option to run on runtimes that aren't in the list of valid values such as ARM64.
Valid values are x86, x64, and ARM.
-|**/Framework: [*framework version*]**|Target .NET version to be used for test execution.
Example values are `Framework35`, `Framework40`, `Framework45`, `FrameworkUap10`, `.NETCoreApp,Version=v1.1`.
TargetFrameworkAttribute is used to automatically detect this option from your assembly, and defaults to `Framework40` when the attribute isn't present. You must specify this option explicitly if you remove the [TargetFrameworkAttribute](/dotnet/api/system.runtime.versioning.targetframeworkattribute) from your .NET Core assemblies.
If the target framework is specified as **Framework35**, the tests run in CLR 4.0 "compatibility mode".
Example: `/Framework:framework40`| -|**/TestCaseFilter:[*expression*]**|Run tests that match the given expression.
is of the format =[\|].
Example: `/TestCaseFilter:"Priority=1"`
Example: `/TestCaseFilter:"TestCategory=Nightly|FullyQualifiedName=Namespace.ClassName.MethodName"`
The **/TestCaseFilter** command-line option can't be used with the **/Tests** command-line option.
For information about creating and using expressions, see [TestCase filter](https://github.com/microsoft/vstest/blob/main/docs/filter.md).| +|**/Framework: [*framework version*]**|Target .NET version to be used for test execution.
Modern framework short forms are accepted and parsed by the NuGet framework parser, for example `net48`, `net6.0`, or `net10.0` (as well as the long forms such as `.NETFramework,Version=v4.8` and `.NETCoreApp,Version=v10.0`).
The legacy aliases `Framework35`, `Framework40`, `Framework45`, `FrameworkCore10`, and `FrameworkUap10` are also accepted.
TargetFrameworkAttribute is used to automatically detect this option from your assembly, and defaults to `Framework40` when the attribute isn't present. You must specify this option explicitly if you remove the [TargetFrameworkAttribute](/dotnet/api/system.runtime.versioning.targetframeworkattribute) from your .NET Core assemblies.
If the target framework is specified as **Framework35**, the tests run in CLR 4.0 "compatibility mode".
Example: `/Framework:net8.0`| +|**/TestCaseFilter:[*expression*]**|Run tests that match the given expression.
is of the format =[\|].
Example: `/TestCaseFilter:"Priority=1"`
Example: `/TestCaseFilter:"TestCategory=Nightly|FullyQualifiedName=Namespace.ClassName.MethodName"`
The **/TestCaseFilter** command-line option can't be used with the **/Tests** command-line option.
For information about creating and using expressions, see [TestCase filter](https://github.com/microsoft/vstest/blob/main/docs/filter.md). When you type a filter directly in a shell, see [Escape filter expressions in the shell](#escape-filter-expressions-in-the-shell).| +|**/Environment:[*NAME*]=[*VALUE*]**|Sets the value of an environment variable for the test host process. Creates the variable if it doesn't exist, and overrides it if it does. This option implies **/InIsolation** and forces the tests to run in an isolated process. Specify the option multiple times to set multiple variables. Short form: **/e**.
Example: `/e:VARIABLE1=VALUE1`| |**/?**|Displays usage information.| -|**/Logger:[*uri/friendlyname*]**|Specify a logger for test results. Specify the parameter multiple times to enable multiple loggers.
Example: To log results into a Visual Studio Test Results File (TRX), use
**/Logger:trx**
**[;LogFileName=\]**
For more information, see [Logging example](#logging-example).| -|**/ListTests:[*file name*]**|Lists discovered tests from the given test container.
Note: The `/TestCaseFilters` option has no effect when listing tests; it only controls which tests get run.| +|**/Logger:[*uri/friendlyname*]**|Specify a logger for test results. Specify the parameter multiple times to enable multiple loggers.
Example: To log results into a Visual Studio Test Results File (TRX), use
**/Logger:trx**
**[;LogFileName=\]**
Use `LogFilePrefix=` instead of `LogFileName` to keep a separate, timestamped file per run. `LogFileName` sets an explicit name and overwrites the previous file, whereas `LogFilePrefix` doesn't.
For more information, see [Logging example](#logging-example).| +|**/ListTests:[*file name*]**|Lists discovered tests from the given test container. Short form: **/lt**.
Note: The `/TestCaseFilters` option has no effect when listing tests; it only controls which tests get run.| |**/ListDiscoverers**|Lists installed test discoverers.| |**/ListExecutors**|Lists installed test executors.| |**/ListLoggers**|Lists installed test loggers.| |**/ListSettingsProviders**|Lists installed test settings providers.| -|**/Blame**|Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash. When a crash is detected, it creates a sequence file in `TestResults//_Sequence.xml` that captures the order of tests that were run before the crash. For more information, see [Blame data collector](https://github.com/microsoft/vstest/blob/main/docs/extensions/blame-datacollector.md).| -|**/Diag:[*file name*]**|Writes diagnostic trace logs to the specified file.| +|**/Blame**|Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash. When a crash is detected, it creates a sequence file in `TestResults//_Sequence.xml` that captures the order of tests that were run before the crash.
You can also collect a crash or hang dump, for example `/Blame:CollectDump;DumpType=full` or `/Blame:CollectHangDump;TestTimeout=90m;HangDumpType=mini`. The equivalent `dotnet test` switches are `--blame-crash` and `--blame-hang`.
For the full option matrix and dump-collection requirements, see [Blame data collector](https://github.com/microsoft/vstest/blob/main/docs/extensions/blame-datacollector.md).| +|**/Diag:[*file name*]**|Writes diagnostic trace logs to the specified file.
Set the trace level with `/Diag:;tracelevel=` (default is `verbose`).| |**/ResultsDirectory:[*path*]**|Test results directory will be created in specified path if not exists.
Example: `/ResultsDirectory:`| |**/ParentProcessId:[*parentProcessId*]**|Process ID of the Parent Process responsible for launching current process.| |**/Port:[*port*]**|The Port for socket connection and receiving the event messages.| |**/Collect:[*dataCollector friendlyName*]**|Enables data collector for the test run. [More information](https://github.com/microsoft/vstest/blob/main/docs/analyze.md).| +|**@[*file*]**|Reads additional options from the specified response file. Arguments in the file are separated by whitespace (spaces or newlines) and quoting is supported, so options can span multiple lines.
Example: `vstest.console.exe @options.rsp`| > [!TIP] > The options and values aren't case-sensitive. @@ -101,6 +103,34 @@ Example of a generated *sequence.xml* file: ``` +In this case, the `` listed last is the test that was running at the time of the crash. + +## Exit codes + +*vstest.console.exe* returns one of two exit codes: + +| Code | Meaning | +|---|---| +| `0` | Success. The requested operation completed and, for a test run, all executed tests passed. | +| `1` | Failure. For example, one or more tests failed, a run error was reported, the command line was invalid or missing, a test source couldn't be loaded, or the run was aborted or canceled. | + +The process never returns any other value. When you run tests through `dotnet test`, the .NET SDK surfaces a non-zero exit code when the run fails in the same way. + +When discovery finds no matching tests, the runner prints a *warning* rather than an error, and by default still returns `0`. To make a run that discovers or selects zero tests return `1` instead, set `true` in the **RunConfiguration** element of your *.runsettings* file. For more information, see [Configure unit tests using a .runsettings file](configure-unit-tests-by-using-a-dot-runsettings-file.md). + +## Escape filter expressions in the shell + +A **/TestCaseFilter** expression is parsed by both your shell and the test platform, so some characters need shell-specific escaping before *vstest.console.exe* receives them. Quoting the whole expression, as in the examples earlier in this article, avoids most problems. The following cases need extra care: + +- **PowerShell**: The comma (`,`) is the array operator and the semicolon (`;`) is a statement separator. Quote the entire filter expression so it's passed through literally, for example `/TestCaseFilter:"FullyQualifiedName=MyNamespace.MyClass.MyMethod"`. +- **Bash and zsh (Linux and macOS)**: Escape `!` with a backslash when you use the `!~` (*not contains*) operator, for example `--filter FullyQualifiedName\!~IntegrationTests` with `dotnet test`. Also quote values that contain characters with special meaning to the shell, such as `<`, `>`, or `,` in a generic type argument list: + + ```bash + dotnet test --filter "FullyQualifiedName=MyNamespace.MyClass.MyMethod" + ``` + +For the full filtering reference and supported properties per test framework, see [TestCase filter](https://github.com/microsoft/vstest/blob/main/docs/filter.md). + ## Logging example Each logger defines its own parameters. Unlike trx, the console logger allows you to set verbosity level. For additional information, type `VSTest.Console/?` at the command line. From bbf5b1a254368546319a432382685d2eaa7dd9cd Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Fri, 17 Jul 2026 12:45:04 +0200 Subject: [PATCH 08/11] Add Related content links to vstest quickstart and omitted/internal switches reference Link to the maintained microsoft/vstest quickstart guide and the full command-line reference (including internal/legacy switches deliberately omitted from this article), keeping that volatile material in one upstream source of truth. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0cc38362-9c3b-46eb-8142-9c49c63dc4a0 --- docs/test/vstest-console-options.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/test/vstest-console-options.md b/docs/test/vstest-console-options.md index 3341cebb28d..51a7665dcc6 100644 --- a/docs/test/vstest-console-options.md +++ b/docs/test/vstest-console-options.md @@ -158,3 +158,10 @@ For UWP, the appxrecipe file must be referenced instead of a DLL. ```cmd vstest.console.exe /Logger:trx /Platform:x64 /framework:frameworkuap10 UnitTestsUWP\bin\x64\Release\UnitTestsUWP.build.appxrecipe ``` + +## Related content + +- [Configure unit tests using a .runsettings file](configure-unit-tests-by-using-a-dot-runsettings-file.md) +- [Quickstart: run tests from the command line](https://github.com/microsoft/vstest/blob/main/docs/quickstart.md) in the vstest repository +- [Full command-line options reference](https://github.com/microsoft/vstest/blob/main/docs/commandline.md), including [internal and legacy switches omitted from this article](https://github.com/microsoft/vstest/blob/main/docs/commandline.md#omitted-switches), in the vstest repository +- [dotnet test command reference](/dotnet/core/tools/dotnet-test) From 216bd8d3615446d8386893432f4c98bde005044a Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Fri, 17 Jul 2026 12:47:26 +0200 Subject: [PATCH 09/11] Complete propagation table: /Platform values, env-vars and data collector links - /Platform: list the full set of accepted architecture values (ARM64, S390x, Ppc64le, RiscV64, LoongArch64) while keeping the Windows x86/x64 caveat. - Add Related content links to the maintained environment-variables and data collector authoring docs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0cc38362-9c3b-46eb-8142-9c49c63dc4a0 --- docs/test/vstest-console-options.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/test/vstest-console-options.md b/docs/test/vstest-console-options.md index 51a7665dcc6..fb22cc65217 100644 --- a/docs/test/vstest-console-options.md +++ b/docs/test/vstest-console-options.md @@ -36,7 +36,7 @@ The following table lists all the options for *VSTest.Console.exe* and short des |**/InIsolation**|Runs the tests in an isolated process.
This isolation makes the *vstest.console.exe* process less likely to be stopped on an error in the tests, but tests might run slower.| |**/UseVsixExtensions**|This option makes the *vstest.console.exe* process use or skip the VSIX extensions installed (if any) in the test run.
This option is deprecated. Starting from the next major release of Visual Studio this option may be removed. Move to consuming extensions made available as a NuGet package.
Example: `/UseVsixExtensions:true`| |**/TestAdapterPath:[*path*]**|Forces the *vstest.console.exe* process to use custom test adapters from a specified path (if any) in the test run.
Example: `/TestAdapterPath:[pathToCustomAdapters]`| -|**/Platform:[*platform type*]**|Forces the given platform to be used, instead of the platform determined from the current runtime. This option is able to force only x86, and x64 platforms on Windows. The ARM option is broken and will result in x64 on most systems.
Do NOT specify this option to run on runtimes that aren't in the list of valid values such as ARM64.
Valid values are x86, x64, and ARM.
+|**/Platform:[*platform type*]**|Forces the given platform architecture to be used, instead of the platform determined from the current runtime. Values are case-insensitive; the accepted values are `x86`, `x64`, `ARM`, `ARM64`, `S390x`, `Ppc64le`, `RiscV64`, and `LoongArch64`.
On Windows, only x86 and x64 can be reliably forced; specifying `ARM` results in x64 on most systems. Don't specify this option to run on a runtime that isn't in the list of valid values.| |**/Framework: [*framework version*]**|Target .NET version to be used for test execution.
Modern framework short forms are accepted and parsed by the NuGet framework parser, for example `net48`, `net6.0`, or `net10.0` (as well as the long forms such as `.NETFramework,Version=v4.8` and `.NETCoreApp,Version=v10.0`).
The legacy aliases `Framework35`, `Framework40`, `Framework45`, `FrameworkCore10`, and `FrameworkUap10` are also accepted.
TargetFrameworkAttribute is used to automatically detect this option from your assembly, and defaults to `Framework40` when the attribute isn't present. You must specify this option explicitly if you remove the [TargetFrameworkAttribute](/dotnet/api/system.runtime.versioning.targetframeworkattribute) from your .NET Core assemblies.
If the target framework is specified as **Framework35**, the tests run in CLR 4.0 "compatibility mode".
Example: `/Framework:net8.0`| |**/TestCaseFilter:[*expression*]**|Run tests that match the given expression.
is of the format =[\|].
Example: `/TestCaseFilter:"Priority=1"`
Example: `/TestCaseFilter:"TestCategory=Nightly|FullyQualifiedName=Namespace.ClassName.MethodName"`
The **/TestCaseFilter** command-line option can't be used with the **/Tests** command-line option.
For information about creating and using expressions, see [TestCase filter](https://github.com/microsoft/vstest/blob/main/docs/filter.md). When you type a filter directly in a shell, see [Escape filter expressions in the shell](#escape-filter-expressions-in-the-shell).| |**/Environment:[*NAME*]=[*VALUE*]**|Sets the value of an environment variable for the test host process. Creates the variable if it doesn't exist, and overrides it if it does. This option implies **/InIsolation** and forces the tests to run in an isolated process. Specify the option multiple times to set multiple variables. Short form: **/e**.
Example: `/e:VARIABLE1=VALUE1`| @@ -164,4 +164,6 @@ vstest.console.exe /Logger:trx /Platform:x64 /framework:frameworkuap10 UnitTests - [Configure unit tests using a .runsettings file](configure-unit-tests-by-using-a-dot-runsettings-file.md) - [Quickstart: run tests from the command line](https://github.com/microsoft/vstest/blob/main/docs/quickstart.md) in the vstest repository - [Full command-line options reference](https://github.com/microsoft/vstest/blob/main/docs/commandline.md), including [internal and legacy switches omitted from this article](https://github.com/microsoft/vstest/blob/main/docs/commandline.md#omitted-switches), in the vstest repository +- [Environment variables understood by the test platform](https://github.com/microsoft/vstest/blob/main/docs/environment-variables.md) in the vstest repository +- [Create a data collector](https://github.com/microsoft/vstest/blob/main/docs/extensions/datacollector.md) in the vstest repository - [dotnet test command reference](/dotnet/core/tools/dotnet-test) From 0eebe727e19d9aad34a1cd7193c4f714d683eaa9 Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Fri, 17 Jul 2026 12:57:36 +0200 Subject: [PATCH 10/11] Reconcile CLI options with vstest, add env vars section, reorg Related content - Remove switches that microsoft/vstest reclassified as internal/omitted from the main options table (/Enablecodecoverage, /UseVsixExtensions, /ListDiscoverers, /ListExecutors, /ListLoggers, /ListSettingsProviders); the full reference (incl. omitted switches) is now linked from the options intro. - Add an Environment variables section with a partial copy of the most user-facing variables, linking to the full upstream list. - Related content: quickstart first; move the full command-line reference to the options intro and the env-vars link into the new section. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0cc38362-9c3b-46eb-8142-9c49c63dc4a0 --- docs/test/vstest-console-options.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/docs/test/vstest-console-options.md b/docs/test/vstest-console-options.md index fb22cc65217..5a3c8e8b114 100644 --- a/docs/test/vstest-console-options.md +++ b/docs/test/vstest-console-options.md @@ -24,7 +24,7 @@ Open [Developer Command Prompt](../ide/reference/command-prompt-powershell.md) t ## General command-line options -The following table lists all the options for *VSTest.Console.exe* and short descriptions of them. You can see a similar summary by typing `VSTest.Console/?` at a command line. +The following table lists the commonly used options for *VSTest.Console.exe* and short descriptions of them. You can see a similar summary by typing `VSTest.Console/?` at a command line. For the complete reference, including internal and legacy switches that aren't listed here, see [vstest.console.exe command line options](https://github.com/microsoft/vstest/blob/main/docs/commandline.md) and specifically [Omitted switches](https://github.com/microsoft/vstest/blob/main/docs/commandline.md#omitted-switches) in the vstest repository. | Option | Description | |---|---| @@ -32,9 +32,7 @@ The following table lists all the options for *VSTest.Console.exe* and short des |**/Settings:[*file name*]**|Run tests with additional settings such as data collectors. For more information, see [Configure unit tests using a .runsettings file](../test/configure-unit-tests-by-using-a-dot-runsettings-file.md)
Example: `/Settings:local.runsettings`| |**/Tests:[*test name*]**|Run tests with names that contain the provided values. This command matches against the full test name, including the namespace. To provide multiple values, separate them by commas.
Example: `/Tests:TestMethod1,testMethod2`
The **/Tests** command-line option can't be used with the **/TestCaseFilter** command-line option.| |**/Parallel**|Specifies that the tests be executed in parallel. By default, up to all available cores on the machine can be used. You can configure the number of cores to use in a settings file.| -|**/Enablecodecoverage**|Enables data diagnostic adapter CodeCoverage in the test run.
Default settings are used if not specified using settings file.| |**/InIsolation**|Runs the tests in an isolated process.
This isolation makes the *vstest.console.exe* process less likely to be stopped on an error in the tests, but tests might run slower.| -|**/UseVsixExtensions**|This option makes the *vstest.console.exe* process use or skip the VSIX extensions installed (if any) in the test run.
This option is deprecated. Starting from the next major release of Visual Studio this option may be removed. Move to consuming extensions made available as a NuGet package.
Example: `/UseVsixExtensions:true`| |**/TestAdapterPath:[*path*]**|Forces the *vstest.console.exe* process to use custom test adapters from a specified path (if any) in the test run.
Example: `/TestAdapterPath:[pathToCustomAdapters]`| |**/Platform:[*platform type*]**|Forces the given platform architecture to be used, instead of the platform determined from the current runtime. Values are case-insensitive; the accepted values are `x86`, `x64`, `ARM`, `ARM64`, `S390x`, `Ppc64le`, `RiscV64`, and `LoongArch64`.
On Windows, only x86 and x64 can be reliably forced; specifying `ARM` results in x64 on most systems. Don't specify this option to run on a runtime that isn't in the list of valid values.| |**/Framework: [*framework version*]**|Target .NET version to be used for test execution.
Modern framework short forms are accepted and parsed by the NuGet framework parser, for example `net48`, `net6.0`, or `net10.0` (as well as the long forms such as `.NETFramework,Version=v4.8` and `.NETCoreApp,Version=v10.0`).
The legacy aliases `Framework35`, `Framework40`, `Framework45`, `FrameworkCore10`, and `FrameworkUap10` are also accepted.
TargetFrameworkAttribute is used to automatically detect this option from your assembly, and defaults to `Framework40` when the attribute isn't present. You must specify this option explicitly if you remove the [TargetFrameworkAttribute](/dotnet/api/system.runtime.versioning.targetframeworkattribute) from your .NET Core assemblies.
If the target framework is specified as **Framework35**, the tests run in CLR 4.0 "compatibility mode".
Example: `/Framework:net8.0`| @@ -43,10 +41,6 @@ The following table lists all the options for *VSTest.Console.exe* and short des |**/?**|Displays usage information.| |**/Logger:[*uri/friendlyname*]**|Specify a logger for test results. Specify the parameter multiple times to enable multiple loggers.
Example: To log results into a Visual Studio Test Results File (TRX), use
**/Logger:trx**
**[;LogFileName=\]**
Use `LogFilePrefix=` instead of `LogFileName` to keep a separate, timestamped file per run. `LogFileName` sets an explicit name and overwrites the previous file, whereas `LogFilePrefix` doesn't.
For more information, see [Logging example](#logging-example).| |**/ListTests:[*file name*]**|Lists discovered tests from the given test container. Short form: **/lt**.
Note: The `/TestCaseFilters` option has no effect when listing tests; it only controls which tests get run.| -|**/ListDiscoverers**|Lists installed test discoverers.| -|**/ListExecutors**|Lists installed test executors.| -|**/ListLoggers**|Lists installed test loggers.| -|**/ListSettingsProviders**|Lists installed test settings providers.| |**/Blame**|Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash. When a crash is detected, it creates a sequence file in `TestResults//_Sequence.xml` that captures the order of tests that were run before the crash.
You can also collect a crash or hang dump, for example `/Blame:CollectDump;DumpType=full` or `/Blame:CollectHangDump;TestTimeout=90m;HangDumpType=mini`. The equivalent `dotnet test` switches are `--blame-crash` and `--blame-hang`.
For the full option matrix and dump-collection requirements, see [Blame data collector](https://github.com/microsoft/vstest/blob/main/docs/extensions/blame-datacollector.md).| |**/Diag:[*file name*]**|Writes diagnostic trace logs to the specified file.
Set the trace level with `/Diag:;tracelevel=` (default is `verbose`).| |**/ResultsDirectory:[*path*]**|Test results directory will be created in specified path if not exists.
Example: `/ResultsDirectory:`| @@ -159,11 +153,25 @@ For UWP, the appxrecipe file must be referenced instead of a DLL. vstest.console.exe /Logger:trx /Platform:x64 /framework:frameworkuap10 UnitTestsUWP\bin\x64\Release\UnitTestsUWP.build.appxrecipe ``` +## Environment variables + +The test platform recognizes several environment variables. The following are the ones most useful when you run tests from the command line. For the complete list, see [Environment variables understood by the test platform](https://github.com/microsoft/vstest/blob/main/docs/environment-variables.md) in the vstest repository. + +| Variable | Description | +|---|---| +|`VSTEST_CONNECTION_TIMEOUT`|Timeout, in seconds, for establishing connections between test platform components (*vstest.console.exe*, testhost, and data collector). The default is 90. Increase it on slow machines or when network latency causes connection timeouts.| +|`VSTEST_DIAG`|Enables diagnostic logging and specifies the path to the log file. Equivalent to the **/Diag** option.| +|`VSTEST_DIAG_VERBOSITY`|Sets the verbosity of diagnostic logging when `VSTEST_DIAG` is enabled. Valid values are `Verbose`, `Info`, `Warning`, and `Error` (default is `Verbose`).| +|`VSTEST_HOST_DEBUG`|Set to any non-empty value to enable debugging of the testhost process.| +|`VSTEST_RUNNER_DEBUG`|Set to any non-empty value to enable debugging of the runner (*vstest.console.exe*).| +|`VSTEST_DUMP_PATH`|Overrides the default directory where blame crash dumps are stored.| +|`VSTEST_DUMP_FORCEPROCDUMP`|Set to any non-empty value to force ProcDump to be used for crash dump collection.| +|`VSTEST_DISABLE_UTF8_CONSOLE_ENCODING`|Set to `1` to disable setting UTF-8 encoding on console output.| +|`VSTEST_CONSOLE_PATH`|Path to the *vstest.console.exe* executable used by the .NET SDK's `dotnet test` forwarding app. Equivalent to `-p:VSTestConsolePath` when you run `dotnet test` on a project.| + ## Related content -- [Configure unit tests using a .runsettings file](configure-unit-tests-by-using-a-dot-runsettings-file.md) - [Quickstart: run tests from the command line](https://github.com/microsoft/vstest/blob/main/docs/quickstart.md) in the vstest repository -- [Full command-line options reference](https://github.com/microsoft/vstest/blob/main/docs/commandline.md), including [internal and legacy switches omitted from this article](https://github.com/microsoft/vstest/blob/main/docs/commandline.md#omitted-switches), in the vstest repository -- [Environment variables understood by the test platform](https://github.com/microsoft/vstest/blob/main/docs/environment-variables.md) in the vstest repository +- [Configure unit tests using a .runsettings file](configure-unit-tests-by-using-a-dot-runsettings-file.md) - [Create a data collector](https://github.com/microsoft/vstest/blob/main/docs/extensions/datacollector.md) in the vstest repository - [dotnet test command reference](/dotnet/core/tools/dotnet-test) From cffadaf9d99df4258dc776e1d5db8df69adeb335 Mon Sep 17 00:00:00 2001 From: Azat Mukhametshin Date: Sun, 19 Jul 2026 22:26:24 +0200 Subject: [PATCH 11/11] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- docs/test/migrate-testsettings-to-runsettings.md | 2 +- docs/test/vstest-console-options.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/test/migrate-testsettings-to-runsettings.md b/docs/test/migrate-testsettings-to-runsettings.md index 37842b0ef5c..6bb3cdcfd43 100644 --- a/docs/test/migrate-testsettings-to-runsettings.md +++ b/docs/test/migrate-testsettings-to-runsettings.md @@ -34,7 +34,7 @@ SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings ``` -If you're interested in reading more on how the *.testsettings* options convert to *.runsettings* you can find more implementation details in the [open source test platform repository](https://github.com/microsoft/vstest/blob/main/docs/RFCs/0023-TestSettings-Deprecation.md#migration) on GitHub. +If you're interested in reading more on how the *.testsettings* options convert to *.runsettings*, you can find more implementation details in the [open source test platform repository](https://github.com/microsoft/vstest/blob/main/docs/RFCs/0023-TestSettings-Deprecation.md#migration) on GitHub. ## Related content diff --git a/docs/test/vstest-console-options.md b/docs/test/vstest-console-options.md index 5a3c8e8b114..78c8f495c5c 100644 --- a/docs/test/vstest-console-options.md +++ b/docs/test/vstest-console-options.md @@ -40,7 +40,7 @@ The following table lists the commonly used options for *VSTest.Console.exe* and |**/Environment:[*NAME*]=[*VALUE*]**|Sets the value of an environment variable for the test host process. Creates the variable if it doesn't exist, and overrides it if it does. This option implies **/InIsolation** and forces the tests to run in an isolated process. Specify the option multiple times to set multiple variables. Short form: **/e**.
Example: `/e:VARIABLE1=VALUE1`| |**/?**|Displays usage information.| |**/Logger:[*uri/friendlyname*]**|Specify a logger for test results. Specify the parameter multiple times to enable multiple loggers.
Example: To log results into a Visual Studio Test Results File (TRX), use
**/Logger:trx**
**[;LogFileName=\]**
Use `LogFilePrefix=` instead of `LogFileName` to keep a separate, timestamped file per run. `LogFileName` sets an explicit name and overwrites the previous file, whereas `LogFilePrefix` doesn't.
For more information, see [Logging example](#logging-example).| -|**/ListTests:[*file name*]**|Lists discovered tests from the given test container. Short form: **/lt**.
Note: The `/TestCaseFilters` option has no effect when listing tests; it only controls which tests get run.| +|**/ListTests:[*file name*]**|Lists discovered tests from the given test container. Short form: **/lt**.
Note: The `/TestCaseFilter` option has no effect when listing tests; it only controls which tests get run.| |**/Blame**|Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash. When a crash is detected, it creates a sequence file in `TestResults//_Sequence.xml` that captures the order of tests that were run before the crash.
You can also collect a crash or hang dump, for example `/Blame:CollectDump;DumpType=full` or `/Blame:CollectHangDump;TestTimeout=90m;HangDumpType=mini`. The equivalent `dotnet test` switches are `--blame-crash` and `--blame-hang`.
For the full option matrix and dump-collection requirements, see [Blame data collector](https://github.com/microsoft/vstest/blob/main/docs/extensions/blame-datacollector.md).| |**/Diag:[*file name*]**|Writes diagnostic trace logs to the specified file.
Set the trace level with `/Diag:;tracelevel=` (default is `verbose`).| |**/ResultsDirectory:[*path*]**|Test results directory will be created in specified path if not exists.
Example: `/ResultsDirectory:`|