[英]Visual Studio 2012 - Fill message test result
When a test end its running i have a list like this 当测试结束时,我会得到一个像这样的列表
Result1 Name: 01- AutoGenerateRequest (requestgenerationtest)
Result1 Outcome: Passed
Result1 Duration: 0:00:26,2924949
Result1 Message:
Result1 StackTrace:
how can i write something in the result message or stacktrace? 我如何在结果消息或stacktrace中写一些东西?
I've found this solution 我找到了这个解决方案
considering the TestContext that i have in my .cs file 考虑我在.cs文件中的TestContext
private TestContext testContextInstance;
public TestContext TestContext
{
get { return testContextInstance; }
set { testContextInstance = value; }
}
i used this method 我用这种方法
TestContext.WriteLine("message");
So in my output i see the message that i log. 因此,在我的输出中,我看到了我记录的消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.