[英]Visual studio Test Explorer Group by name Namespace
[英]Get VS Test Explorer to show only test name not full type name
我的VS测试资源管理器显示包括完整类型名称的测试,如下所示:
CompanyName.ProjectName.Web.Tests.SutDoesWhatItShould
而不仅仅是:
SutDoesWhatItShould
这是非常难以理解/烦人的。 我该如何解决?
我正在使用xunit runner用于visual studio(预发行版)和xunit.net。
在v2中,这现在是可配置的,请参阅http://xunit.github.io/docs/configuration-files.html
所以你需要添加到app.config:
<appSettings>
<add key="xunit.methodDisplay" value="method"/>
</appSettings>
并且如评论中所述,您可能需要重新启动Visual Studio。
对于.NET Core项目(使用.json
配置):
xunit.runner.json
文件添加到测试项目中,其中包含以下内容: { "methodDisplay": "method" }
Copy if newer
您刚刚添加的xunit.runner.json
文件的选项Copy if newer
,请设置Copy if newer
有关更多信息,请参阅文档 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.