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/live-unit-testing-start.md
+3-21Lines changed: 3 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,9 @@ ms.author: "ronpet"
15
15
---
16
16
# Get started with Live Unit Testing in Visual Studio
17
17
18
-
When you enable Live Unit Testing in a Visual Studio solution, Live Unit Testing visually depicts your test coverage and the status of your tests. It also dynamically executes tests whenever you modify your code. It provides immediate notification when changes have broken your code and indicates areas for which additional tests are needed. In this topic, you'll learn to use Live Unit Testing by creating a simple class library and using MSTest to test it.
18
+
When you enable Live Unit Testing in a Visual Studio solution, Live Unit Testing visually depicts your test coverage and the status of your tests. It also dynamically executes tests whenever you modify your code. It provides immediate notification when changes have broken your code and indicates areas for which additional tests are needed.
19
+
20
+
Live Unit Testing can be used to test solutions that target either the .NET Framework or .NET Core. In this tutorial, you'll learn to use Live Unit Testing by creating a simple class library that targets the .NET Standard, and you'll create an MSTest project that targets .NET Core to test it.
19
21
20
22
# [C#](#tab/csharp)
21
23
The complete C# solution can be downloaded from the [MicrosoftDocs/visualstudio-docs](https://github.com/MicrosoftDocs/visualstudio-docs/tree/master/docs/test/samples/csharp/utilitylibraries/) repo on GitHub.
@@ -376,26 +378,6 @@ This provides enough information for a preliminary investigation of the bug. Eit
376
378
377
379
---
378
380
379
-
## Excluding selected tests
380
-
381
-
# [C#](#tab/csharp)
382
-
In large solutions with a large number of projects and test methods, you may not want all your tests to run all the time. Live Unit Testing lets you suspend the automatic execution of selected tests.
383
-
384
-
For example, since the `TestStartswithUpper` method has consistently passed, you might choose to exclude it from Live Unit Testing. To do this, right-click on the method signature of `TestStartswithUpper` method and select **Live Tests**, **Exclude TestStartsWithUpper**. Once you do this, as the following figure shows, the test is no longer shown in **Test Explorer**, and Live Unit Testing displays an empty beaker icon to represent the status of the test method; the icon indicates that the method is a test method, but that it is inactive.pn.com
385
-
386
-
You can also exclude individual test methods programmatically, and you can choose on per-project basis which tests to include or exclude. For more information on excluding tests, see [Including and excluding test projects and test methods](live-unit-testing.md#including-and-excluding-test-projects-and-test-methods).
387
-
388
-
# [Visual Basic](#tab/visual-basic)
389
-
In large solutions with a large number of projects and test methods, you may not want all your tests to run all the time. Live Unit Testing lets you suspend the automatic execution of selected tests.
390
-
391
-
For example, since the `TestStartswithUpper` method has consistently passed, you might choose to exclude it from Live Unit Testing. To do this programmatically, apply the `<TestCategory("SkipWhenLiveUnitTesting")>` attribute to the method to the method, as the following figure shows. Once you do this, the test is no longer shown in **Test Explorer**, and Live Unit Testing displays an empty beaker icon to represent the status of the test method; the icon indicates that the method is a test method, but that it is inactive.
392
-
393
-

394
-
395
-
You can also exclude individual test methods programmatically, and you can choose on per-project basis which tests to include or exclude. For more information on excluding tests, see [Including and excluding test projects and test methods](live-unit-testing.md#including-and-excluding-test-projects-and-test-methods).
396
-
397
-
---
398
-
399
381
## See also
400
382
[Live Unit Testing in Visual Studio](live-unit-testing.md)
401
383
[Live Unit Testing Frequently Asked Questions](live-unit-testing-faq.md)
0 commit comments