Writing Custom HTML Logs

那年仲夏 提交于 2019-12-04 00:59:59

The instructions say:

With the modifications to the QTAgent32.exe.config file in place, when you run a coded UI test you will see there is an output link in the Test Explorer results. Log files are produced not only when your test fails, but also for successful tests when the trace level is set to “verbose.”

brrrrth

We're currently evaluating what sort of logging we want and it doesn't sound like there's a lot of options.

this.TestContext.WriteLine("Some logging stuff");

  • This only goes to the standard output of the test, under the TestContext Messages header. Unfortunately, it doesn't go into the UITestActionLog.html, which is the question asked above.

It sounds like, based on these two links, there is not a way to do this easily out of the box: http://social.msdn.microsoft.com/Forums/vstudio/en-US/4c9b11bc-e1a6-4024-928f-c4ceb849fec3/how-to-edit-coded-ui-log-fileuitestactionloghtml-for-customizing-the-log-details?forum=vstest http://social.msdn.microsoft.com/Forums/vstudio/en-US/a53ddcf4-11f7-4586-8256-c4e238dc192a/is-it-possible-to-write-message-into-uitestactionlog?forum=vstest

You could use this to find the log file, and then write your own logger to append to that: How to get path to UITestActionLog.html from code

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