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.
... <root> <root> <level value="DEBUG" /> ... <appender-ref ref="QtpUdpAppender" /> </root>
- Add an appender element and its attributes, as shown in the following example.
<appender name="QtpUdpAppender"type="log4net.Appender.UdpAppender"> <remoteAddress value="188.8.131.52" /> <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
- 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.
- How to performance test AngularJS or ReactJS applications? - June 25, 2017
- How to run Apache JMeter tests with Visual Studio Team Services? - June 6, 2017
- Google Test Automation Conference – GTAC 2017 - June 2, 2017
- What’s new in StormRunner 2.5? - June 1, 2017
- Must have Apache JMeter Plugins - May 19, 2017