Condividi tramite


How to enable test agent logs

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

Comments

  • Anonymous
    October 12, 2014
    The comment has been removed

  • Anonymous
    October 15, 2014
    Vamsi, What is the error message that you are getting? There might be other QTAgent*.exe.config file like QTAgent32_40.exe.config and you might have to enable the logs in them to get the error message?RegardsAseem Bansal

  • Anonymous
    March 11, 2015
    Hi,i am unable to change the QTAgent32 config file as am getting an error - Access denied while saving the file even i opened the file with admin. Can you please help on this.-Thanks,Bheema.

  • Anonymous
    May 06, 2015
    Hi Bheema...YOu need to open notepad.exe as an admin and then open the file from there... then u can save

  • Anonymous
    May 11, 2015
    Hi Aseem..searched the internet but did not get detailed information about : a. the various QTAgent*.exe s .What is the significance of each and when are they invoked b. what are the VS***.logs generated corresponding to each QTAgent and the information they log

  • Anonymous
    May 11, 2015
    Hi Aseem..searched the internet but did not get detailed information about : a. the various QTAgent*.exe s .What is the significance of each and when are they invoked b. what are the VS***.logs generated corresponding to each QTAgent and the information they log