Skip to content

Commit 5e8b20e

Browse files
committed
Doc updates for MSTest
1 parent db88975 commit 5e8b20e

File tree

4 files changed

+41
-17
lines changed

4 files changed

+41
-17
lines changed

docs/core/testing/mstest-analyzers/mstest0021.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ms.author: amauryleve
2222
| **Enabled by default** | No |
2323
| **Default severity** | Info |
2424
| **Introduced in version** | 3.4.0 |
25-
| **There is a code fix** | No |
25+
| **There is a code fix** | Yes, starting with 3.7.0 |
2626

2727
## Cause
2828

docs/core/testing/unit-testing-platform-config.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ The platform will automatically detect and load the *[appname].testconfig.json*
2929

3030
When using [Microsoft.Testing.Platform.MSBuild](https://www.nuget.org/packages/Microsoft.Testing.Platform.MSBuild), you can simply create a *testconfig.json* file that will be automatically renamed to *[appname].testconfig.json* and moved to the output directory of the test project.
3131

32+
Starting with Microsoft.Testing.Platform 1.5, the command-line argument `--config-file` can be used to specify the path to the *testconfig.json*. This takes precedence over the *[appname].testconfig.json* file.
33+
3234
> [!NOTE]
3335
> The *[appname].testconfig.json* file will get overwritten on subsequent builds.
3436
@@ -38,3 +40,7 @@ Environment variables can be used to supply some runtime configuration informati
3840

3941
> [!NOTE]
4042
> Environment variables take precedence over configuration settings in the *testconfig.json* file.
43+
44+
### `TESTINGPLATFORM_UI_LANGUAGE` environment variable
45+
46+
Starting with Microsoft.Testing.Platform 1.5, this environment variable specifies the culture used by the platform for displaying messages and logs. This takes precedence over the Visual Studio and .NET SDK languages.

docs/core/testing/unit-testing-platform-extensions-fakes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ To use the new extension with an existing project, update the existing `Microsof
2525
- </Reference>
2626
+ <PackageReference Include="Microsoft.Testing.Extensions.Fakes" Version="17.11.0-beta.24319.3" />
2727
```
28+
29+
If you are using MSTest.Sdk 3.7 or later, use `EnableMicrosoftTestingExtensionsFakes` property to enable the extension and don't add the package reference.

docs/core/testing/unit-testing-platform-intro.md

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,56 +183,72 @@ To run a test project in CI add one step for each test executable that you wish
183183
184184
The list below described only the platform options. To see the specific options brought by each extension, either refer to the extension documentation page or use the `--help` option.
185185

186+
- **`@`**
187+
188+
Specifies a response file (rsp).
189+
190+
- **`--config-file`**
191+
192+
Specifies a [*testconfig.json*](unit-testing-platform-config.md) file.
193+
186194
- **`--diagnostic`**
187195

188-
Enables the diagnostic logging. The default log level is `Trace`. The file is written in the output directory with the following name format, `log_[MMddHHssfff].diag`.
196+
Enables the diagnostic logging. The default log level is `Trace`. The file is written in the output directory with the following name format, `log_[MMddHHssfff].diag`.
189197

190198
- **`--diagnostic-filelogger-synchronouswrite`**
191199

192-
Forces the built-in file logger to synchronously write logs. Useful for scenarios where you don't want to lose any log entries (if the process crashes). This does slow down the test execution.
200+
Forces the built-in file logger to synchronously write logs. Useful for scenarios where you don't want to lose any log entries (if the process crashes). This does slow down the test execution.
193201

194202
- **`--diagnostic-output-directory`**
195203

196-
The output directory of the diagnostic logging, if not specified the file is generated in the default _TestResults_ directory.
204+
The output directory of the diagnostic logging, if not specified the file is generated in the default _TestResults_ directory.
197205

198206
- **`--diagnostic-output-fileprefix`**
199207

200-
The prefix for the log file name. Defaults to `"log_"`.
208+
The prefix for the log file name. Defaults to `"log_"`.
201209

202210
- **`--diagnostic-verbosity`**
203211

204-
Defines the verbosity level when the `--diagnostic` switch is used. The available values are `Trace`, `Debug`, `Information`, `Warning`, `Error`, or `Critical`.
212+
Defines the verbosity level when the `--diagnostic` switch is used. The available values are `Trace`, `Debug`, `Information`, `Warning`, `Error`, or `Critical`.
213+
214+
- **`--exit-on-process-exit`**
215+
216+
Exit the test process if dependent process exits. PID must be provided.
205217

206218
- **`--help`**
207219

208-
Prints out a description of how to use the command.
220+
Prints out a description of how to use the command.
209221

210222
- **`-ignore-exit-code`**
211223

212-
Allows some non-zero exit codes to be ignored, and instead returned as `0`. For more information, see [Ignore specific exit codes](./unit-testing-platform-exit-codes.md#ignore-specific-exit-codes).
224+
Allows some non-zero exit codes to be ignored, and instead returned as `0`. For more information, see [Ignore specific exit codes](./unit-testing-platform-exit-codes.md#ignore-specific-exit-codes).
213225

214226
- **`--info`**
215227

216-
Displays advanced information about the .NET Test Application such as:
228+
Displays advanced information about the .NET Test Application such as:
217229

218-
- The platform.
219-
- The environment.
220-
- Each registered command line provider, such as its, `name`, `version`, `description` and `options`.
221-
- Each registered tool, such as its, `command`, `name`, `version`, `description`, and all command line providers.
230+
- The platform.
231+
- The environment.
232+
- Each registered command line provider, such as its, `name`, `version`, `description` and `options`.
233+
- Each registered tool, such as its, `command`, `name`, `version`, `description`, and all command line providers.
222234

223-
This feature is used to understand extensions that would be registering the same command line option or the changes in available options between multiple versions of an extension (or the platform).
235+
This feature is used to understand extensions that would be registering the same command line option or the changes in available options between multiple versions of an extension (or the platform).
224236

225237
- **`--list-tests`**
226238

227-
List available tests. Tests will not be executed.
239+
List available tests. Tests will not be executed.
228240

229241
- **`--minimum-expected-tests`**
230242

231-
Specifies the minimum number of tests that are expected to run. By default, at least one test is expected to run.
243+
Specifies the minimum number of tests that are expected to run. By default, at least one test is expected to run.
232244

233245
- **`--results-directory`**
234246

235-
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.
247+
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.
248+
249+
- **`--timeout`**
250+
251+
A global test execution timeout. Takes one argument as string in the format `<value>[h|m|s]` where `<value>` is float.
236252

237253
## MSBuild integration
238254

0 commit comments

Comments
 (0)