开发者

How do I add an output file to the result window using mstest?

开发者 https://www.devze.com 2023-03-25 07:35 出处:网络
My test has a file as output.I would like to see that 开发者_开发问答file in the output window for my test (i.e. if I right click on a completed test and select: View Test Results Details).Make sure y

My test has a file as output. I would like to see that 开发者_开发问答file in the output window for my test (i.e. if I right click on a completed test and select: View Test Results Details).


Make sure your TestClass has a property called TestContext of type TestContext then inside your test you can add the line:

TestContext.AddResultFile(fullyQualifiedName);

where the fullyQualifiedName is a string of the path to your file.

0

精彩评论

暂无评论...
验证码 换一张
取 消