Getting Detailed Test Results From Coded UI Tests (CUIT)

October 14, 2012 — 11 Comments

Coded UI Tests can fail for a number of reasons, producing detailed logs that can be used to rapidly identify what caused the failure. The interesting characteristic about the logs produced by the tests, is that each action results in a detailed entry consisting of information about the how to find the control, the technology used to find the control and a screenshot of the action including a red box above the control upon which the action is performed. These details can help identify if the CUIT has been able to find the right control. It can also help locate instances where the target control is missing.


To enable this level of detail in the test results, open explorer and go to the following folder

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

In this location you will find QTAgent32.exe.config. This is that first file that I usually modify to augment the verbosity of the logs.  Before opening files in this directory, be sure that you have the permissions to edit and save files.

Locate the following section in the configuration file and set the “EqTraceLevel” to 4.

    <!-- 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" />

Then scroll down to the appSettings section and a key “EnableHttpLogger” with a value of “true”. Then add another key “EnableSnapshotInfo” with a value of “true”. I read that “EnableSnapshotInfo” was not required for the RTM version of Visual Studio 2012, but I kept it around for my last test.


    <add key="EnableSnapshotInfo" value="true"/>
    <add key="EnableHttpLogger" value="true"/>

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

The following are the names of the other QTAgent configuration files found in the same location.








11 responses to Getting Detailed Test Results From Coded UI Tests (CUIT)


    In my Common7/IDE folder I do not have QTAgent32_40.exe.config. Any thoughts?



    Loving it – thanks!



    Where can i find the Html File that is generated ?



    Nice article; thanks for sharing this. I’m new to the UI automation especially the CUIT tool. I’m trying to automate an App (Win and WPF based) using the Coded UI test in CVS2010 premium edition. And, after I run the tests I need to generate a report about the test results and test performance. I see one folder named TestResults, but my goal is to display (or save on xls files) the test results as soon as the test is completed. So, I wonder is there a way that I can configure the CUIT project or is there any command line (I use the MSTest.exe to run the test command line) program that I can use in this purpose (displaying or saving the test result). Another quick information I would love to know, how do I start Profiling my test case created by CUIT outside of the VS IDE? Or, I would say, how do I automate a test case profiling? I appreciate any suggestion. Thank you!



    Hi, thanks for the article. Does this work with windows phone? I have a windows app which this works with, but I can’t find anyway to get output from the windows phone tests… Thanks



    if my VS version was 2015, cant i do this?



    When I am running my coded UI script and building solution Even I cant get the folder of test results in the destination folder:Few days before I had run the same script in that time there were folder generated of named Test Results


Trackbacks and Pingbacks:

  1. Coded UI | Vincent - February 23, 2017

    […] Getting Detailed Test Results From Coded UI Tests (CUIT) « Alexandre Brisebois ☁; […]


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s