From cd04cc79fd8a72b5cb4df3f00e57764dad232a96 Mon Sep 17 00:00:00 2001 From: Youssef1313 Date: Thu, 28 Nov 2024 09:55:59 +0100 Subject: [PATCH] Add docs for --maximum-failed-tests --- docs/core/testing/unit-testing-platform-exit-codes.md | 1 + docs/core/testing/unit-testing-platform-intro.md | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/docs/core/testing/unit-testing-platform-exit-codes.md b/docs/core/testing/unit-testing-platform-exit-codes.md index 322f0721e8e40..f1ad13068992a 100644 --- a/docs/core/testing/unit-testing-platform-exit-codes.md +++ b/docs/core/testing/unit-testing-platform-exit-codes.md @@ -26,6 +26,7 @@ ms.topic: reference | `10` | The exit code `10` indicates that the test adapter, Testing.Platform Test Framework, MSTest, NUnit, or xUnit, failed to run tests for an infrastructure reason unrelated to the test's self. An example is failing to create a fixture needed by tests. | | `11` | The exit code `11` indicates that the test process will exit if dependent process exits. | | `12` | The exit code `12` indicates that the test session was unable to run because the client does not support any of the supported protocol versions. | +| `13` | The exit code `13` indicates that the test session was stopped due to reaching the specified number of maximum failed tests using `--maximum-failed-tests` command-line option. For more information, see [the Options section in Microsoft.Testing.Platform overview](unit-testing-platform-intro.md#options) | To enable verbose logging and troubleshoot issues, see [Microsoft.Testing.Platform Diagnostics extensions](unit-testing-platform-extensions-diagnostics.md#built-in-options). diff --git a/docs/core/testing/unit-testing-platform-intro.md b/docs/core/testing/unit-testing-platform-intro.md index 16504ec473507..ac30161b143f0 100644 --- a/docs/core/testing/unit-testing-platform-intro.md +++ b/docs/core/testing/unit-testing-platform-intro.md @@ -261,6 +261,13 @@ The list below described only the platform options. To see the specific options List available tests. Tests will not be executed. +- **`--maximum-failed-tests`** + + Specifies the maximum number of tests failures that, when reached, will stop the test run. Support for this switch requires framework authors to implement the `IGracefulStopTestExecutionCapability` capability. The exit code when reaching that amount of test failures is 13. For more information, see [Microsoft.Testing.Platform exit codes](unit-testing-platform-exit-codes.md). + + > [!NOTE] + > This feature is available in Microsoft.Testing.Platform starting with version 1.5. + - **`--minimum-expected-tests`** Specifies the minimum number of tests that are expected to run. By default, at least one test is expected to run.