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/improve-code-quality.md
+29-8Lines changed: 29 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,18 +41,19 @@ Visual Studio is also extensible and opens the door for third-party unit testing
41
41
> [!NOTE]
42
42
> Live unit testing is available in Enterprise edition only and is only supported for .NET code.
43
43
44
-
## IntelliTest
44
+
::: moniker range="visualstudio"
45
+
## AI tools to generate tests
45
46
46
-
IntelliTest automatically generates unit tests and test data for your managed code. IntelliTest improves coverage and dramatically reduces the effort to create and maintain unit tests for new or existing code.
47
+
Starting in Visual Studio 2026 Insiders build, you can use GitHub Copilot testing for .NET to automatically generate unit tests. GitHub Copilot testing for .NET not only generates the tests, but debugs the tests, and runs them in Test Explorer. For more information, see [Overview of GitHub Copilot testing for .NET](../test/github-copilot-test-dotnet-overview.md). This is the recommended method to generate tests.
47
48
48
-

49
+
Alternatively, you can use Copilot `/tests` slash command to generate unit tests from code. For example, you can type `/tests using NUnit Framework` to generate NUnit tests. For more information, see [Use slash commands in Copilot Chat](../ide/copilot-chat-context.md#slash-commands).
50
+
::: moniker-end
49
51
50
-
> [!NOTE]
51
-
> IntelliTest is available in Enterprise edition only. It is supported for C# code that targets the .NET Framework. .NET Core and .NET Standard are not currently supported.
52
+
::: moniker range="=vs-2022"
53
+
## AI tools to generate tests
52
54
53
-
*[Generate unit tests for your code with IntelliTest](generate-unit-tests-for-your-code-with-intellitest.md)
54
-
*[IntelliTest – One test to rule them all](https://devblogs.microsoft.com/devops/intellitest-one-test-to-rule-them-all/)
You can use Copilot `/tests` slash command to generate unit tests from code. For example, you can type `/tests using NUnit Framework` to generate NUnit tests. For more information, see [Use slash commands in Copilot Chat](../ide/copilot-chat-context.md#slash-commands).
56
+
::: moniker-end
56
57
57
58
## Code coverage
58
59
@@ -90,6 +91,26 @@ Code coverage is an option when you run test methods using Test Explorer. The re
90
91
91
92
::: moniker-end
92
93
94
+
## IntelliTest
95
+
96
+
IntelliTest automatically generates unit tests and test data for your managed code. IntelliTest improves coverage and dramatically reduces the effort to create and maintain unit tests for new or existing code.
97
+
98
+

99
+
100
+
> [!NOTE]
101
+
> IntelliTest is available in Enterprise edition only. It is supported for C# code that targets the .NET Framework. .NET Core and .NET Standard are not supported.
102
+
103
+
*[Generate unit tests for your code with IntelliTest](generate-unit-tests-for-your-code-with-intellitest.md)
104
+
*[IntelliTest – One test to rule them all](https://devblogs.microsoft.com/devops/intellitest-one-test-to-rule-them-all/)
Copy file name to clipboardExpand all lines: docs/test/unit-test-your-code.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Explore unit test tools and tasks
3
3
description: Learn about the unit test tools you can use to give developers and testers a quick way to look for logic errors in your code.
4
-
ms.date: 12/05/2023
4
+
ms.date: 11/25/2025
5
5
ms.topic: article
6
6
helpviewer_keywords:
7
7
- Visual Studio, unit tests
@@ -28,7 +28,14 @@ The unit test tools include:
28
28
29
29
***Microsoft Fakes isolation framework**—The Microsoft Fakes isolation framework can create substitute classes and methods for production and system .NET code that create dependencies in the code under test. By implementing the fake delegates for a function, you control the behavior and output of the dependency object.
30
30
31
+
::: moniker range="visualstudio"
32
+
Starting in Visual Studio 2026 Insiders build, you can use GitHub Copilot testing for .NET to automatically generate unit tests. GitHub Copilot testing for .NET not only generates the tests, but debugs the tests, and runs them in Test Explorer. For more information, see [Overview of GitHub Copilot testing for .NET](../test/github-copilot-test-dotnet-overview.md). This is the recommended method to generate tests.
33
+
34
+
Alternatively, you can use Copilot `/tests` slash command to generate unit tests from code. For example, you can type `/tests using NUnit Framework` to generate NUnit tests. For more information, see [Use slash commands in Copilot Chat](../ide/copilot-chat-context.md#slash-commands).
35
+
::: moniker-end
36
+
::: moniker range="<= vs-2022"
31
37
For .NET, you can also use [IntelliTest](../test/generate-unit-tests-for-your-code-with-intellitest.md) to explore your code and generate test data and a suite of unit tests. For every statement in the code, a test input is generated that will execute that statement. A case analysis is performed for every conditional branch in the code.
0 commit comments