There is a description entry for Unit Tests in Visual Studio. Is it possible to modify a test description after creation?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
[TestMethod]
[Microsoft.VisualStudio.TestTools.UnitTesting.Description("Test Case Description")]
public void EnsureTestCaseValid()
{
}
回答2:
The Description column in the Test View is readonly, but if you select a test and look in the Properties window, you'll find that the Description property is editable. This will add a [Description("string")]
attribute to the test.