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/test/run-unit-tests-with-test-explorer.md
+14-18Lines changed: 14 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ Choose one of these options for running tests:
55
55
56
56
- To run all the tests in a default group, select the **Run** icon and then select the group on the menu.
57
57
58
-
- To run individual tests, select one or more tests, right-click on the pane, and then select **Run Selected Tests** (or select Ctrl+R, T).
58
+
- To run individual tests, select one or more tests, right-click somewhere on the pane, and then select **Run Selected Tests** (or select Ctrl+R, T).
59
59
60
60
If individual tests have no dependencies that prevent them from being run in any order, turn on parallel test execution on the settings menu of the toolbar. This action can reduce the time for running all the tests.
61
61
@@ -98,13 +98,13 @@ If the test fails, the details pane also displays:
98
98
99
99
### View the source code of a test method
100
100
101
-
To display the source code for a test method in the Visual Studio editor, select the test, right-click on the pane, and then select **Open Test** (or select the F12 key).
101
+
To display the source code for a test method in the Visual Studio editor, right-click the test, and then select **Open Test** (or select the F12 key).
102
102
103
103
## Group and filter the test list
104
104
105
105
In Test Explorer, you can group your tests into predefined categories. Most unit test frameworks that run in Test Explorer let you define your own categories and category/value pairs to group your tests. You can also filter the list of tests by matching strings against test properties.
106
106
107
-
### Group tests in the test list
107
+
### Grouping tests in the test list
108
108
109
109
::: moniker range="vs-2019"
110
110
Test Explorer lets you group your tests into a hierarchy. The default hierarchy grouping is **Project**, **Namespace**, and then **Class**. To change the way that tests are organized, select the **Group By** button  and then select a new grouping criterion.
@@ -166,7 +166,7 @@ You can create and save a list of tests that you want to run or view as a group.
166
166
To create a playlist:
167
167
168
168
1. Choose one or more tests in Test Explorer.
169
-
1. Right-click on the pane, point to **Add to Playlist**, and then select **New Playlist**.
169
+
1. Right-click somewhere on the pane, point to **Add to Playlist**, and then select **New Playlist**.
170
170
171
171

172
172
@@ -194,7 +194,7 @@ You can learn more about the rules by saving the playlist via the **Save** butto
194
194
195
195

196
196
197
-
If you want to make a playlist for traits, use the following format for the Microsoft Testing Framework (MSTest):
197
+
If you want to make a playlist for traits, use the following format for the MSTest framework:
198
198
199
199
```xml
200
200
<PlaylistVersion="2.0">
@@ -226,7 +226,7 @@ You can create and save a list of tests that you want to run or view as a group.
226
226
To create a playlist:
227
227
228
228
1. Choose one or more tests in Test Explorer.
229
-
1. Right-click on the pane, point to **Add to Playlist**, and then select **New Playlist**.
229
+
1. Right-click somewhere on the pane, point to **Add to Playlist**, and then select **New Playlist**.
230
230
231
231

232
232
@@ -254,7 +254,7 @@ You can learn more about the rules by saving the playlist via the **Save** butto
254
254
255
255

256
256
257
-
If you want to make a playlist for traits, use the following format for the Microsoft Testing Framework (MSTest):
257
+
If you want to make a playlist for traits, use the following format for the MSTest framework:
258
258
259
259
```xml
260
260
<PlaylistVersion="2.0">
@@ -283,12 +283,10 @@ Use the following format for the xUnit framework. Make sure there's a space betw
283
283
::: moniker range="vs-2019"
284
284
### Test Explorer columns
285
285
286
-
[Groups](#test-explorer-groups) are also available as columns in Test Explorer, along with **Trait**, **Stack Trace**, **Error Message**, and **Fully Qualified Name**. Most columns are not visible by default. You can customize which columns appear and their order.
286
+
[Groups](#test-explorer-groups) are also available as columns in Test Explorer, along with **Traits**, **Stack Trace**, **Error Message**, and **Fully Qualified Name**. Most columns are not visible by default. You can customize which columns appear.
287
287
288
288

289
289
290
-
### Filter, sort, and rearrange test columns
291
-
292
290
Columns can be filtered, rearranged, and sorted:
293
291
294
292
- To filter to specific traits, select the filter icon at the top of the **Traits** column.
@@ -305,12 +303,10 @@ Columns can be filtered, rearranged, and sorted:
305
303
::: moniker range=">=vs-2022"
306
304
### Test Explorer columns
307
305
308
-
[Groups](#test-explorer-groups) are also available as columns in Test Explorer, along with **Trait**, **Stack Trace**, **Error Message**, and **Fully Qualified Name**. Most columns are not visible by default. You can customize which columns appear and their order.
306
+
[Groups](#test-explorer-groups) are also available as columns in Test Explorer, along with **Traits**, **Stack Trace**, **Error Message**, and **Fully Qualified Name**. Most columns are not visible by default. You can customize which columns appear.
309
307
310
308

311
309
312
-
### Filter, sort, and rearrange test columns
313
-
314
310
Columns can be filtered, rearranged, and sorted:
315
311
316
312
- To filter to specific traits, select the filter icon at the top of the **Traits** column.
@@ -328,7 +324,7 @@ Columns can be filtered, rearranged, and sorted:
328
324
329
325
You can also use Test Explorer search filters to limit the test methods in your projects that you view and run.
330
326
331
-
When you type a string in the **Test Explorer** search box and select **Enter**, the test list is filtered to display only those tests whose fully qualified names contain the string.
327
+
When you type a string in the **Test Explorer** search box and select the Enter key, the test list is filtered to display only tests whose fully qualified names contain the string.
332
328
333
329
To filter by a different criterion:
334
330
@@ -347,7 +343,7 @@ To filter by a different criterion:
347
343
::: moniker-end
348
344
349
345
> [!NOTE]
350
-
> Searches are caseinsensitive and match the specified string to any part of the criterion value.
346
+
> Searches are case-insensitive and match the specified string to any part of the criterion value.
351
347
352
348
|Qualifier|Description|
353
349
|-|-----------------|
@@ -383,10 +379,10 @@ For more information, see [Use code coverage to determine how much code is being
383
379
384
380
You can run tests from Test Explorer by either:
385
381
386
-
- Right-clicking in the code editor on a test and then selecting **Run test**
382
+
- Right-clicking a test in the code editor and then selecting **Run test**
387
383
- Using the default [Test Explorer shortcuts](../ide/default-keyboard-shortcuts-in-visual-studio.md#bkmk_testexplorerGLOBAL) in Visual Studio
388
384
389
-
Some of the shortcuts are contextbased. They run, [debug](../test/debug-unit-tests-with-test-explorer.md), or [profile](../test/debug-unit-tests-with-test-explorer.md#diagnose-performance-problems-with-a-test-method) tests based on where your cursor is in the code editor. If your cursor is inside a test method, then that test method runs. If your cursor is at the class level, then all the tests in that class run. The same behavior is true for the namespace level.
385
+
Some of the shortcuts are context-based. They run, [debug](../test/debug-unit-tests-with-test-explorer.md), or [profile](../test/debug-unit-tests-with-test-explorer.md#diagnose-performance-problems-with-a-test-method) tests based on where your cursor is in the code editor. If your cursor is inside a test method, then that test method runs. If your cursor is at the class level, then all the tests in that class run. The same behavior is true for the namespace level.
390
386
391
387
|Frequent commands| Keyboard shortcuts|
392
388
|-|------------------------|
@@ -409,7 +405,7 @@ You can set up these sounds in the default Windows 11 **Sound** dialog. This fea
409
405
410
406
1. Open the default Windows 11 **Sound** dialog.
411
407
2. Go to the **Sounds** tab.
412
-
3. Find the **Microsoft Visual Studio** category. Choose the **Test Run Succeeded** or **Test Run Failed** preset sounds, or browse to your own audio file.
408
+
3. Find the **Microsoft Visual Studio** category. Choose the **Test Run Succeeded** or **Test Run Failed** preset sound, or browse to your own audio file.
413
409
414
410

Copy file name to clipboardExpand all lines: docs/test/test-explorer-faq.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ ms.subservice: test-tools
19
19
20
20
## Dynamic test discovery
21
21
22
-
**Test Explorer is not discovering my tests that are dynamically defined (for example, theories, custom adapters, custom traits, and #ifdef statements). How can I discover these tests?**
22
+
**Test Explorer is not discovering my tests that are dynamically defined (for example, theories, custom adapters, custom traits, and #ifdef statements). How can I make sure it discovers these tests?**
23
23
24
24
Build your project to run assembly-based discovery.
25
25
@@ -71,11 +71,11 @@ The hierarchy view sorts tests alphabetically, not by outcome. Previous group-by
71
71
72
72
**In the hierarchy view, there are passed, failed, skipped, and not-run icons next to parent-node groupings. What do these icons mean?**
73
73
74
-
The icons next to the **Project**, **Namespace**, and **Class** groupings show the state of the tests within that grouping. See the following table.
74
+
The icons next to the **Project**, **Namespace**, and **Class** groupings show the state of the tests within each grouping. See the following table.
75
75
76
76

77
77
78
-
## Search by file path
78
+
## Searches by file path
79
79
80
80
**Why is there is no longer a file path filter in the Test Explorer search box?**
81
81
@@ -85,17 +85,17 @@ The file path filter in the Test Explorer search box was removed in Visual Studi
85
85
86
86
**Some test-related APIs are no longer present in Visual Studio 2019. What changed?**
87
87
88
-
In Visual Studio 2019, some test window APIs that were previously marked public but were never officially documented were removed. They were marked as deprecated in Visual Studio 2017 to give extension maintainers an early warning. To our knowledge, very few extensions found these APIs and took a dependency on them. They include `IGroupByProvider`, `IGroupByProvider<T>`, `KeyComparer`, `ISearchFilter`, `ISearchFilterToken`, `ISearchToken`, and `SearchFilterTokenType`.
88
+
In Visual Studio 2019, some test window APIs that were previously marked public but were never officially documented will be removed. They were marked as deprecated in Visual Studio 2017 to give extension maintainers an early warning. To our knowledge, very few extensions found these APIs and took a dependency on them. They include `IGroupByProvider`, `IGroupByProvider<T>`, `KeyComparer`, `ISearchFilter`, `ISearchFilterToken`, `ISearchToken`, and `SearchFilterTokenType`.
89
89
90
90
If this change affects your extension, let us know by filing a bug on [Developer Community](https://aka.ms/feedback/suggest?space=8).
91
91
92
92
## Test adapter NuGet reference
93
93
94
94
**Why don't my tests run in Visual Studio 2017 version 15.8, even though they're discovered?**
95
95
96
-
All test projects must include their .NET test adapter NuGet reference in their .csproj file. If they don't, the following test output appears on the project if discovery by a test adapter extension starts after a build, or if the user tries to run the selected tests:
96
+
All test projects must include their .NET test adapter NuGet reference in their .csproj file. If they don't, the following test output appears on the project if discovery by a test adapter extension starts after a build, or if you try to run the selected tests:
97
97
98
-
**Test project {} does not reference any .NET NuGet adapter. Test discovery or execution might not work for this project. It is recommended to reference NuGet test adapters in each .NET test project in the solution.**
98
+
> **Test project {} does not reference any .NET NuGet adapter. Test discovery or execution might not work for this project. It is recommended to reference NuGet test adapters in each .NET test project in the solution.**
99
99
100
100
Instead of using test adapter extensions, projects are required to use test adapter NuGet packages. This requirement greatly improves performance and causes fewer problems with continuous integration. Read more about the deprecation of .NET test adapter extensions in the [release notes](/visualstudio/releasenotes/vs2017-relnotes-v15.8#testadapterextension).
101
101
@@ -105,7 +105,7 @@ Instead of using test adapter extensions, projects are required to use test adap
105
105
106
106
Recent UWP test projects specify a build property that allows better performance for identifying test apps. If you have a UWP test project that was initialized before Visual Studio version 15.7, you might see this error in **Output** > **Tests**:
107
107
108
-
**System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: The following TestContainer was not found {} at Microsoft.VisualStudio.TestWindow.Controller.TestContainerProvider \<GetTestContainerAsync>d__61.MoveNext()**
108
+
> **System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: The following TestContainer was not found {} at Microsoft.VisualStudio.TestWindow.Controller.TestContainerProvider \<GetTestContainerAsync>d__61.MoveNext()**
0 commit comments