单元测试支持
ReSharper helps discover as well as 运行或调试 unit tests right in Visual Studio . 支持以下单元测试框架:
NUnit — ReSharper installation includes two bundled test runners that support NUnit versions up to 2.7.1 and up to 3.15.5 respectively. NUnit versions up to 4.1.0 are also supported and are used if the corresponding NuGet package is installed in the project.
MSTest 适用于所有 支持的 Visual Studio 版本
使用 VSTest 和 Microsoft.Testing.Platform 的自定义测试框架,例如 TUnit。
要启用对这些框架的支持,请在 ReSharper 选项 的 页面上选择相应的复选框 Alt+R, O 。
To analyze coverage of Testing Platform tests, the test project also needs a dotCover NuGet package. 更多信息,请参阅 Analyze coverage of Testing Platform tests。
Machine.Specifications (需要一个 扩展)。 有关使用扩展的更多信息,请参阅 管理扩展。
Jasmine 1.3。 - 2.3。
使用 ReSharper,您可以执行单个单元测试、测试类、文件、项目或解决方案中的所有测试。 您还可以在测试会话中组合执行任意数量的测试。
单元测试支持可以通过其他 JetBrains .NET 产品扩展:您可以使用 dotTrace分析单元测试的性能,并使用 dotCover分析单元测试的代码覆盖率。 这些产品包含在 dotUltimate许可证中。
在本节中:
- 在当前文档中
- 在项目或解决方案中
- 单元测试会话
- 测试类别
- 执行测试
- 分析测试结果
- 创建单元测试
- 在测试和被测试代码之间导航
- 维护单元测试的代码质量
- 使用 dotCover 分析代码覆盖率
- Analyze coverage of Testing Platform tests
- 使用 dotTrace 分析单元测试
- 使用 dotMemory Unit 监控内存
- 单元测试资源管理器窗口
- 单元测试会话窗口
此功能在以下语言和技术中是 支持的:
此处提供的说明和示例介绍了在 C# 中使用该功能。 有关其他语言的更多信息,请参阅 语言和框架 部分中的相关主题。