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-config.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,8 @@ The platform will automatically detect and load the *[appname].testconfig.json*
29
29
30
30
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.
31
31
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
+
32
34
> [!NOTE]
33
35
> The *[appname].testconfig.json* file will get overwritten on subsequent builds.
34
36
@@ -38,3 +40,7 @@ Environment variables can be used to supply some runtime configuration informati
38
40
39
41
> [!NOTE]
40
42
> Environment variables take precedence over configuration settings in the *testconfig.json* file.
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.
If you are using MSTest.Sdk 3.7 or later, use `EnableMicrosoftTestingExtensionsFakes` property to enable the extension and don't add the package reference.
Copy file name to clipboardExpand all lines: docs/core/testing/unit-testing-platform-intro.md
+32-16Lines changed: 32 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,56 +183,72 @@ To run a test project in CI add one step for each test executable that you wish
183
183
184
184
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.
185
185
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
+
186
194
- **`--diagnostic`**
187
195
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`.
189
197
190
198
- **`--diagnostic-filelogger-synchronouswrite`**
191
199
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.
193
201
194
202
- **`--diagnostic-output-directory`**
195
203
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.
197
205
198
206
- **`--diagnostic-output-fileprefix`**
199
207
200
-
The prefix for the log file name. Defaults to `"log_"`.
208
+
The prefix for the log file name. Defaults to `"log_"`.
201
209
202
210
- **`--diagnostic-verbosity`**
203
211
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.
205
217
206
218
- **`--help`**
207
219
208
-
Prints out a description of how to use the command.
220
+
Prints out a description of how to use the command.
209
221
210
222
- **`-ignore-exit-code`**
211
223
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).
213
225
214
226
- **`--info`**
215
227
216
-
Displays advanced information about the .NET Test Application such as:
228
+
Displays advanced information about the .NET Test Application such as:
217
229
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.
222
234
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).
224
236
225
237
- **`--list-tests`**
226
238
227
-
List available tests. Tests will not be executed.
239
+
List available tests. Tests will not be executed.
228
240
229
241
- **`--minimum-expected-tests`**
230
242
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.
232
244
233
245
- **`--results-directory`**
234
246
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.
0 commit comments