Here are the steps which you should perform to enable test agent logs.

1. Go to your test agent installation directory (typically it is something like C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\).

2. Open the agent service configuration file (QTAgentService.exe.config) and change the trace level to 4 and enable the trace listener as shown below:

  <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> 

.....

    <add key="CreateTraceListener" value="yes"/>
  </appSettings>
</configuration>

3. Do step 2 for agent execution processes (QTAgent.exe.config, QTAgent32.exe.config) and agent collection processes (QTDCAgent.exe.config and QTDCAgent32.exe.config).

4. Restart the test agent (service or process).

After this the log files named (VSTTagent.log, VSTTAgentProcess.log, VSTTDCAgentProcess.log) should get generated in the installation directory itself.

Note: – If the test agent is running under a user account and not under system account (like Network Service), then you can use another mechanism (which is much simpler) to enable/disable logging. In this mechanism, you will set a couple of registry keys which will update the log level for all the processes and there is no need to edit configuration file for each process. More details on these registry keys (files) are mentioned in Gautam’s blog here but please note that these registry settings are under HKCU (Current user) so before you apply the registry settings mentioned on Gautam’s blog, you should be logged in to the machine as the user under which the test agent is running.  Using this mechanism the log files are generated in the %temp% directory of the user. 

Posted Saturday, November 28, 2009 8:02 AM by aseemb | 0 Comments