Enabling Coded UI Test playback logs in Visual Studio 2012 Release Candidate

Enabling Coded UI Test playback logs in Visual Studio 2012 Release Candidate

  • Comments 3

In Jason Zander’s blog post: Announcing the Release Candidate (RC) of Visual Studio 2012 and .NET Framework 4.5 he showed a new Coded UI feature  -capturing playback logs.

 

Please note this blog post has been updated.  Please see:

Enabling Tracing and HtmlLogger in Coded UI Test

 

 

 

 

 

 

 

 

 

 

Unfortunately CodedUI doesn’t do this by default and finding the logs isn’t always obvious.  

To enable CodedUI Test Playback logs you need to set some configuration settings in the file QTAgent32.exe.config to make this work.  This file can be found at:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE

The settings are:

<system.diagnostics>
   <switches>

     <!-- You must use integral values for "value".
          Use 0 for off, 1 for error, 2 for warn, 3 for info, and 4 for verbose. -->

     <add name="EqtTraceLevel" value="4" />
   </switches>
</system.diagnostics>

and:

<appSettings>

<appSettings>
 
<add key="EnableHtmlLogger" value="true"/>
<add key="EnableSnapshotInfo" value="true"/>

<add key="StopTestRunCallTimeoutInSeconds" value="5"/>
  <add key="LogSizeLimitInMegs" value="20"/>
  <add key="CreateTraceListener" value="no"/>
  <add key="GetCollectorDataTimeout" value="300"/>
</appSettings>

Now when you run a codedUI Test (even successful ones with the trace level set to “verbose”) you will see there is an output link in the Test Explorer results

image

Which in turn will take you to the Test output containing the UITestActionLog.html

image

 

-Which contains the CodeUI Test Log Jason showed in his blog.

 

image

Leave a Comment
  • Please add 1 and 8 and type the answer here:
  • Post
  • Hello Charles,

    I modified the qtagent32.exe.config file as instructed above then restarted VS and re-ran the coded UI test.  However, I did not see the UItestactionlog.html link in the Output page.  Can you help me figure out why this link isn't showing?

    Thanks,

    --Stefzoom

  • Works for me. Stefzoom, pls note that there are are multiple "QTAgent.exe.config" in the IDE folder, you should change "QTAgent32.exe.config"  Note the "32" in the file name.

  • One limitation seems to be the log does not record actions from any initialize methods that may be in a coded UI test.  I've tried class and test initialize but neither gets logged.  It would be great if someone could tell me how to log these too if it is possible.  

    Thanks

    Joe

Page 1 of 1 (3 items)