Analyzing Coded UI Tests Using Coded UI Test Logs

坚强是说给别人听的谎言 提交于 2019-12-25 04:53:17

问题


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:


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.



来源:https://stackoverflow.com/questions/29943953/analyzing-coded-ui-tests-using-coded-ui-test-logs

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