使用编码的UI测试日志分析编码的UI测试 [英] Analyzing Coded UI Tests Using Coded UI Test Logs
问题描述
我正在尝试获取已编码的ui测试的html日志文件。
i尝试了以下链接中提到的步骤
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/zh-CN/library/jj159363(v = vs.110).aspx
默认情况下,它会生成.png文件(图像文件),该文件仅捕获发生错误的活动窗口的屏幕截图。
因此,我尝试在配置文件中使用 EqtTraceLevel的其他值,但没有区别,它仍会生成图像文件。
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.
它能正常工作吗对于Windows应用程序?
Does it work for Windows application? if it does what are the additional settings required?
推荐答案
要在测试中启用HTML日志记录,您应该添加 Playback.PlaybackSettings.LoggerOverrideState = HtmlLoggerState.AllActionSnapshot;
进行测试。
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.
或者更改 QTAgent32.exe.config
或 C中的
(或已安装VS的位置)包含以下设置: QTAgent32_40.exe.config
:$ Program Files(x86)\Microsoft Visual Studio 11.0\Common7\IDE
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>
其中0处于关闭状态,1表示错误,2表示警告,3表示信息,4表示详细。
Where 0 is off, 1 for errors, 2 for warnings, 3 for info and 4 for verbose.
这篇关于使用编码的UI测试日志分析编码的UI测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!