Analyzing Coded UI Tests Using Coded UI Test Logs
Coded UI test logs filter and record important information about your coded UI test runs.
Visual Studio Ultimate, Visual Studio Premium
Depending on your scenario, use one of the following methods to enable the log.
Target .NET Framework version 4 with no App.config file present in the test project
Target .NET Framework version 4.5 with no App.config file present in the test project
App.config file present in the test project
Enable logging from the test code itself
LoggerOverrideState = HtmlLoggerState.AllActionSnapshot;
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.”
On the TEST menu, choose Windows and then select Test Explorer.
On the BUILD menu, choose Build Solution.
In Test Explorer, select the coded UI test you want to run, open its shortcut menu, and then choose Run Select Tests.
The automated tests will run and indicate if they passed or failed.
To view Test Explorer from the Test menu, point to Windows and then choose Test Explorer.
Choose the Output link in the Test Explorer results.
This displays the output for the test which will include a link to the action log.
Choose the UITestActionLog.html link.
The log is displayed in your web browser.
In previous versions of Visual Studio, there were two more configuration settings for enabling Html Logger in Coded UI Test:
<add key="EnableHtmlLogger" value="true"/> <add key="EnableSnapshotInfo" value="true"/>
Both of these settings have been deprecated in Visual Studio 2012. EqtTraceLevel is the only setting which is required to be modified to enable HtmlLogger.