How do I add an output file to the result window using mstest?
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.
精彩评论