在codeD UI HtmlLogger输出文件写入消息
我使用的自动化测试codeD UI。我已经在QTAgent32.exe.config文件中启用HtmlLogger。我得到的HTML输出文件。但我考虑写在HTML输出文件的一些消息。我用 this.TestContext.WriteLine(信息);
写在结果文件(带有.trx)的输出,但它不是在输出HTML输出文件写入。是否有任何解决方案,同时测试运行在HTML文件中写?
任何帮助将是非常美联社preciated!
I am using Coded UI for Automation testing. I have already enabled HtmlLogger in QTAgent32.exe.config file. I am getting the html output file. but I am considering to write some messages in that html output file. I used this.TestContext.WriteLine("Message");
to write output in result file (.trx) but it is not writing in output html output file. Is there any solutions to write in html file while test is running?
Any help would be highly appreciated !
我发现,有写进去UITestActionLog.html没有直接的方法,但我们可以通过获取文件路径交上UITestActionLog.html文件code和编写使用HtmlTextWriter类。
请参考该链接。
MSDN回答
I found that there is no direct way to write into UITestActionLog.html but we can hand code in UITestActionLog.html file by getting the file path and write using HtmlTextWriter class. Please refer to the link. MSDN Answer