有谁知道如何在 Visual Studio 2015 测试运行期间显示描述属性?
例如给出这个测试:
[TestMethod]
[TestCategory("With Fakes")]
[Description("Posting a blog entry without the required data should return a BadRequest")]
public async Task BlogEntryPostTest1()
{
... do test
}
运行时如何显示描述?我不认为 Test Explorer 会这么做;还有其他选择吗?
I 不认为 https://stackoverflow.com/a/1421908/2912011这是可能的测试浏览器 https://msdn.microsoft.com/en-us/library/hh270865.aspx(至少 2015 年)。我还相信 ReSharpers“单元测试”不支持它tool https://resharper-support.jetbrains.com/hc/en-us/community/posts/206669615-How-to-display-nunit-Test-Description-attribute-in-report。我认为查看单元测试旁边显示的描述标签的唯一方法是使用.
您可以将您的声音添加到提议的更改中here https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/6414712-show-test-description-descriptionattribute-in-te。也许在测试资源管理器的下一个版本中他们会添加它......现在我会使用 NUnit()如果您确实需要查看描述,如果不需要,也许您可以考虑其他一些设计方案 https://stackoverflow.com/questions/1421814/is-summary-necessary-in-unit-test-method.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)