How to enable Unified Functional Testing (UFT) logs

How to enable Unified Functional Testing (UFT) logs?

Product - Version:

Unified Functional Testing;

OS:

Updated :

2016-Jul-06

Summary :

UFT Logs

Previously, QuickTest Professional used tool <QTP>\bin\ClientLogs.exe utility, setting up its section called "QTP", however for UFT, this option does not capture any logs.

So how to capture UFT logs considering the above?

Solution

IMPORTANT: Review entire below summary (and is supplementary sections indicated) before implementing steps.

  1. Close UFT.exe, UFTRemoteAgent.exe, AQTRmtAgent.exe and QTAutomationAgent.exe
  2. Locate tool's "Logs" directory/folder (see A section below)
  3. Configure all necessary config.xml files (see B section below)
  4. Clear (or delete contents of) "Logs" directory/folder.
  5. Reproduce situation. If reproduction requires multiple repetitions/iterations, repeat steps 4 - 5.

    Note: Enabling logs as suggested may generate larger logs files, so minimizing the tasks done on UFT to reproduce, and clearing the logs before each attempt of reproduction, may help collecting more accurate information from such logs.
     
  6. (If possible) Collect date and time when issue. IMPORTANT NOTE: Required when analyzing large amount of logs and/or very lengthy logs.
     
  7. Compress logs to ZIP

Logs location/path/directory

The UFT log files generated from below steps should get created by default under the following path:

%APPDATA%\Hewlett-Packard\UFT\Logs
or 
C:\Users\<username>\AppData\Roaming\Hewlett-Packard\UFT\Logs

To navigate to above, go to "Start" > "Run" and type above path.

Note: if, and only IF, above path is not found, then:

  1. Open desired log configuration file (*.xml)
  2. Search below tag/structure:

    <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="${APPDATA}\Hewlett-Packard\UFT\Logs\HP.UFT.log" />
  3. Confirm "file value" is pointing to desired path. 
    Note: Above is pointing to default mentioned before/above: %APPDATA%\Hewlett-Packard\UFT\Logs
  4. (Optional) If desired, change path to another location and save file, for example:

    <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="C:\MyLogs\HP.UFT.log" />

Configure XML files

  1. Ensure having Read/Write permissions on <UFT>\bin
     
  2. Create copy/backup of <UFT>\bin\log.config.xml

    Note: If you do not have writing permissions 
     
  3. Open text editor: <UFT>\bin\log.config.xml
     
  4. If the reproduction scenario is random and/or requires long executions, increase the value of maxSizeRollBackups accordingly:
  • Hours long: <maxSizeRollBackups value="100" />
  • Days long: <maxSizeRollBackups value="1000" />

 

  • Change the "level value" under "root" tag to DEBUG (instead of ERROR):

    <root>
     <level value="DEBUG" />
      <appender-ref ref="RollingFileAppender" />
    </root> 
     
  • Make sure all appender-ref element values are set to "RollingFileAppender":

    <root>
     <level value="DEBUG" />
      <appender-ref ref="RollingFileAppender" />
    </root>
     
  • If involving API scriptsadd logger/tag named "HP.ST" as below:

    <logger name="HP.ST">
      <priority value="ALL"/>
      <level value="ALL"/>
      <appender-ref ref="RollingLogFileAppender"/>
      <appender-ref ref="ColoredConsoleAppender" />
      <appender-ref ref="Recorder" />
      <appender-ref ref="DebugAppender" />
      <appender-ref ref="FileAppender" />
    </logger>
     
  • Save changes on log.config.xml
     
  • Foe <UFT>\bin\log.config.AutomationAgent.xml, repeat steps 1 to 6, THEN save changes.
     
  • For <UFT>\bin\log.config.RemoteAgent.xml, repeat steps 1 to 6, THEN:

 

1. Set "level value" to DEBUG, under "LogCatRmtAgent" logger:

<logger name="LogCatRmtAgent">
  <level value="DEBUG" />
 <appender-ref ref="RollingFileAppender" />
</logger>
 

2. Save
 

  1. For <UFT>\bin\qeee.log.config.xml, repeat steps 1 to 5, THEN:

0. Make sure all appender-ref element values are set to "QEEE_RollingFileAppender":

<root>
 <level value="DEBUG" />
  <appender-ref ref="QEEE_RollingFileAppender" />
</root>
 

1. Set "level value" to DEBUG, under "HP.QTP.QEEE" logger:

<logger name="HP.QTP.QEEE" >
  <level value="DEBUG" />
</logger> 
 

2. Save

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk