Unit Test Description question

帅比萌擦擦* 提交于 2019-12-05 12:38:31

问题


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.



来源:https://stackoverflow.com/questions/7112811/unit-test-description-question

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!