You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/testing/unit-testing-platform-extensions-vstest-bridge.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ When enabled by the test framework, you can use `--settings <SETTINGS_FILE>` to
22
22
23
23
### RunConfiguration element
24
24
25
-
The **RunConfiguration**element can include the following elements. None of these settings are respected by `Microsoft.Testing.Platform`:
25
+
The following **RunConfiguration** elementsare not supported by `Microsoft.Testing.Platform`:
26
26
27
27
| Node | Description | Reason / Workaround |
28
28
|------|-------------|---------------------|
@@ -32,7 +32,7 @@ The **RunConfiguration** element can include the following elements. None of the
32
32
|**TargetPlatform**| This setting defines the architecture to use to run tests. |`<RuntimeIdentifier>` determines the architecture of the final application that hosts the tests. |
33
33
|**TreatTestAdapterErrorsAsWarnings**| Suppresses test adapter errors to become warnings. | Microsoft.Testing.Platform allows only one type of tests to be run from a single assembly, and failure to load the test framework or other parts of infrastructure will become an un-skippable error, because it signifies that some tests could not be discovered or run. |
34
34
|**TestAdaptersPaths**| One or more paths to the directory where the TestAdapters are located| Microsoft.Testing.Platform does not use the concept of test adapters and does not allow dynamic loading of extensions unless they are part of the build, and are registered in `Program.cs`, either automatically via build targets or manually. |
35
-
|**TestCaseFilter**| A filter to limit tests which will run. |To filter tests use `--filter` command line option. |
35
+
|**TestCaseFilter**| A filter to limit tests which will run. |Starting with v1.6, this runsettings entry is now supported. Before this version, you should use `--filter` command line option instead. |
36
36
|**TestSessionTimeout**| Allows users to terminate a test session when it exceeds a given timeout.| There is no alternative option. |
37
37
|**DotnetHostPath**| Specify a custom path to dotnet host that is used to run the test host. | Microsoft.Testing.Platform is not doing any additional resolving of dotnet. It depends fully on how dotnet resolves itself, which can be controlled by environment variables such as [`DOTNET_HOST_PATH`](../tools/dotnet-environment-variables.md#dotnet_host_path). |
38
38
|**TreatNoTestsAsError**| Exit with non-zero exit code when no tests are discovered. | Microsoft.Testing.Platform will error by default when no tests are discovered or run in a test application. You can set how many tests you expect to find in the assembly by using `--minimum-expected-tests` command line parameter, which defaults to 1. |
@@ -52,3 +52,12 @@ Loggers in `Microsoft.Testing.Platform` are configured through command-line para
52
52
This extension also offer the ability to use VSTest filtering mechanism to discover or run only the tests that matches the filter expression. For more information, see the [Filter option details](../tools/dotnet-test.md#filter-option-details) section or for framework specific details see the [Running selective unit tests](./selective-unit-tests.md) page.
53
53
54
54
When enabled by the test framework, you can use `--filter <FILTER_EXPRESSION>`.
55
+
56
+
## TestRun parameters
57
+
58
+
You can pass parameters to the test run by using the `--test-parameters` command line option in the format `key=value`. This option can be specified multiple times, one for each parameter to set.
59
+
60
+
These parameters can then be accessed by the test framework in the test run:
61
+
62
+
- for MSTest, use <xref:Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.Properties>
63
+
- for NUnit, use [TestContext.TestParameters](https://docs.nunit.org/articles/nunit/writing-tests/TestContext.html#testparameters)
0 commit comments