Learn to use Visual Studio, Visual Studio Online, Application Insights and Team
Foundation Server to decrease rework, increase transparency into your application and increase the rate at which
you can ship high quality software throughout the application lifecycle
Enabling HtmlLogger & Tracing in Coded UI Test
There have been a few changes in Visual Studio 2012 how Coded UI Test are run & how to enable logging. Now we can have both .NET v4.0 & v4.5 type Coded UI Test projects. Note this is an extension to previous blog on enabling tracing for Coded UI Test which is also applicable for Coded UI Test as well.
Below are various ways for enabling logs in Coded UI Test
Method to enable log
Target framework version v4.0 & no App.config file present in the test project
Target framework version v4.5 & no app.config file present in the test project
App.config file present in test project
<add name="EqtTraceLevel" value="4" />
Enabling logging from Test code itself
Playback.PlaybackSettings.LoggerOverrideState = HtmlLoggerState.AllActionSnapshot;
Please refer to MSDN
These same settings are applicable for Visual Studio 2012 Test Agent as well.
In the blog Analyzing Coded UI Tests Using Coded UI Test Logs there are two more configuration settings mentioned 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 RTM. EqtTraceLevel is the only setting which is required to be modified to enable HtmlLogger
In my Common7/IDE folder I don't have QTAgent32_40.exe.config. Thoughts?
I've tried to get this going and it's not working... have triple checked file edited correctly, have cleared the check box for Keep test execution running between test runs -- still no html link in output. Not sure what else to try?
In VS2013, do the above, plus add to your code:
"App.config file present in test project" what do you mean by that? When I create a project, I don't see the app.config file being created