Analyzing Coded UI Tests Using Coded UI Test Logs

2019-09-11 05:21发布

i am trying to get the html log file for the coded ui tests. i tried the steps mentioned in the following link

https://msdn.microsoft.com/en-us/library/jj159363(v=vs.110).aspx

By default it generated .png file(image file) which captures only the screenshot of the active window where the error occurred. So i tried using the other values for "EqtTraceLevel" in the configuration file, but there is no difference, it still generates image file.

Does it work for Windows application? if it does what are the additional settings required?

1条回答
Melony?
2楼-- · 2019-09-11 06:01

To enable HTML logging in your tests you should add Playback.PlaybackSettings.LoggerOverrideState = HtmlLoggerState.AllActionSnapshot; to your test.

This will show all steps taken in your test and a corresponding screenshot of your application under test. It will also show you a highlight rectangle to show the found control.

Alternatively change QTAgent32.exe.config or QTAgent32_40.exe.config in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE (or where you have VS installed) to contain the following settings:

 <appSettings>
   <!--- Your settings -->
   <add key="EnableHtmlLogger" value="true"/>
 </appSettings>

And to increase the detail of your logging:

 <switches>
   <add name="EqtTraceLevel"value="4"/>
 </switches>

Where 0 is off, 1 for errors, 2 for warnings, 3 for info and 4 for verbose.

查看更多
登录 后发表回答