Close

February 5, 2013

Log Tracking in HP QuickTest Pro

In this blog post, we will see about one of the new feature of HP QuickTest Pro 11 called Log Tracking. I hope most of us not noticed about Log Tracking feature in HP QTP.

Log Tracking is the feature introduced in HP QTP version 11. It helps test engineers to work with developers to pinpoint the issues in Windows based applications.

When this feature gets enabled, QTP receives, Java or .NET framework related logs and it appends with the playback results.

By analyzing the log messages will helps developers to fix the issues at the earliest.

Prerequisites to enable log tracking in QTP:

  • Your application under test (AUT) must be windows based application which must use Java or .NET framework that includes UDP appender which sends logging events as connectionless UDP datagrams to a remote host or a multicast group using an UdpClient.
  • Verify that logging is enabled in AUT
  • Verify that log file is writable.
  • Identify the version of the framework which should include UDP appender.

Configuring Log configuration file manually

Now we will see how to configure a log configuration file manually, so that QuickTest receives messages and appends in the run results.

  • Add an appender-ref ref attribute with the value of QtpUdpAppender to the root element.
  • Specify the minimum log message level that you want QuickTest to include in the run results.

Example:

...
<root>
<root>
    <level value="DEBUG" />
...
    <appender-ref ref="QtpUdpAppender" />
</root>
  • Add an appender element and its attributes, as shown in the following example.

Example:

<appender name="QtpUdpAppender"type="log4net.Appender.UdpAppender">
    <remoteAddress value="1.1.1.1" />
    <remotePort value="18081" />
    <encoding value="utf-16" />
    <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
        <prefix value="" />
    </layout>
</appender>

How to configure Log Tracking in QTP?

To configure Log Tracking, navigate to File > Settings in QTP, click on Log Tracking and then check Add log messages to run results as shown below.

Now specify the settings:

  • Log message source
  • Port
  • Minimum level to add node to results tree

[auto_thumb width=”150″ height=”150″ link=”” lightbox=”true” align=”center” title=”Log Tracking in HP QuickTest Pro – File Settings” alt=”Log Tracking in HP QuickTest Pro – File Settings – QAInsights” iframe=”false” frame=”true” crop=”true”]http://qainsights.com/wp-content/uploads/2013/02/Log-Tracking-in-HP-QuickTest-Pro-File-Settings.jpg[/auto_thumb]

Configuring Log configuration file automatically

  • Navigate to File > Settings in QTP, then click on Log Tracking and the check Auto-configure log mechanism.
  • Browse the configuration file, and set the minimum log level.

Please if you manually configured log configuration file, please uncheck the Auto-configure log mechanism check box as shown below. This will prevent QuickTest from modifying the configuration file.

[auto_thumb width=”150″ height=”150″ link=”” lightbox=”true” align=”center” title=”Log Tracking in HP QuickTest Pro – Auto Configure” alt=”Log Tracking in HP QuickTest Pro – Auto Configure – QAInsights” iframe=”false” frame=”true” crop=”true”]http://qainsights.com/wp-content/uploads/2013/02/Log-Tracking-in-HP-QuickTest-Pro-Auto-Configure.jpg[/auto_thumb]

Once the log tracking feature enabled, QTP receives log messages that match during run session and appends in the test results. Now execute your script and open Run Results Viewer window, navigate to View > Log Tracking. See below figure.

[auto_thumb width=”150″ height=”150″ link=”” lightbox=”true” align=”center” title=”Log Tracking in HP QuickTest Pro – Run Results – This image courtesy HP” alt=”Log Tracking in HP QuickTest Pro – Run Results – QAInsights” iframe=”false” frame=”true” crop=”true”]http://qainsights.com/wp-content/uploads/2013/02/Log-Tracking-in-HP-QuickTest-Pro-Run-Results.jpg[/auto_thumb]

Thanks for visiting QAInsights!

We’re always posting interesting articles on QAInsights. I request you to subscribe so you don’t miss out anything.

Subscribe to our QAInsights YouTube Channel. Subscribe our free weekly newsletter or Google feeds.

 

About NaveenKumar Namachivayam

Hi there! is a passionate and experienced Performance Test Analyst based in Chicago, USA with skill sets in Manual Testing, Test Automation, Performance Testing, and Test Estimation. He loves to learn and experiment new trends and models in Software Testing. Please stop by at his personal blogs: Excel Blog, DealsBrook, NaveenKumarN.in, and Affiliate Insights blog and Software Testing Memes.

2 Comments on “Log Tracking in HP QuickTest Pro

Kush
June 11, 2013 at 3:09 pm

Hi..can you please tell me what should be included in configuration file.i used the code above to manually configure the file but i keep getting error “the qtp cannot modify the file because the file data or format is invalid”

Reply
QAInsights
July 4, 2013 at 12:15 pm

can you please send me your code?

Reply

Leave a Reply to QAInsights Cancel reply

Your email address will not be published. Required fields are marked *