我有一个包含单元测试项目的解决方案。我正在使用NUnit v3.10.1和NUnit3TestAdapter v3.10.0。
是否可以配置测试名称在Visual Studio Team Services(VSTS)中的显示方式,也许显示测试类名称?目前,它仅显示测试名称:
很难理解哪个测试属于哪个类。在这种情况下,我至少有两个测试类具有相同的测试名称。
使用Reshaper的测试运行程序运行相同的测试,很容易理解哪些测试属于哪些类:
我尝试设置TestFixture Attribute属性的TestName
或设置Test Attribute的Description
时没有运气:
[TestFixture(TestName = "MemoryCacheManagerTests_TryGetItem", TestOf = typeof(MemoryCacheManager))]
public class MemoryCacheManagerTests_TryGetItem : MemoryCacheManagerTests
{
[Test(Description = "MemoryCacheManagerTests_TryGetItem_WithInvalidCacheKey_ShouldThrowArgumentException")]
[TestCaseSource(typeof(InvalidCacheKeyTestCases))]
public void WithInvalidCacheKey_ShouldThrowArgumentException(string key)
{
// ...
}
}
那么如何在VSTS上配置测试的名称?
答案 0 :(得分:2)
否,无法对其进行配置。您可以提交UserVoice项目以提出产品改进建议。