![](https://visualstudio.microsoft.com/wp-content/uploads/2021/10/vs22-test-explorer.png)
IntelliTest
大大减少了创建和维护新代码或现有代码单元测试的工作。 针对你的方法生成有趣的输入输出值,并将它们另存为具有高代码覆盖率的小测试套件。 随着代码的演变自动对它们进行改进。
![](https://visualstudio.microsoft.com/wp-content/uploads/2021/10/vs22-intellitest.png)
![](https://visualstudio.microsoft.com/wp-content/uploads/2021/10/vs22-live-unit-testing.png)
Live Unit Testing
Live Unit Testing 会自动在后台运行所有受影响的单元测试并在 Visual Studio 中实时显示代码覆盖范围。 修改代码时,Live Unit Testing 可以让你了解现有测试是否覆盖代码更改,或者是否需要编写新测试。 在键入时获取编写新测试的温馨提示。
![](https://visualstudio.microsoft.com/wp-content/uploads/2023/02/vs22-test-explorer-group.webp)
![](https://visualstudio.microsoft.com/wp-content/uploads/2021/10/Testing-Tools-Test-Indicators.png)
![](https://visualstudio.microsoft.com/wp-content/uploads/2021/10/vs22-code-coverage.png)
![](https://visualstudio.microsoft.com/wp-content/uploads/2021/10/vs22-fakes.png)