Oct 8, 2009

Tool comparison: Winrunner and QTP

1. Purpose

The purpose of this article is to make Comparative study over win runner and QTP (Automation testing tools for Functionality)

2. Introduction

Winrunner

Mercury Win Runner is the standard functional testing solution for enterprise IT

Applications. It captures, verifies, and replays user interactions automatically, so

You can identify defects and ensure that business processes work as designed. The scripting language use in winrunner is TSL.

The scripts you create with Mercury Interactive systems are written in Test Script Language (TSL). TSL is an enhanced, C-like programming language designed for testing. At the heart of Mercury Interactive's integrated testing environment, TSL is high-level and easy to use. It combines the power and flexibility of conventional programming languages with functions specifically developed for use with Mercury Interactive's products. This enables you to modify recorded material or to program sophisticated test suites.

clip_image002

Function types

Analog functions

Context Sensitive functions

Customization functions

Standard functions

Two Recording Modes

In Winrunner, when we record a test script, there are two recording modes; test scripts can be in both modes or in either mode. The two modes are:

  1. Context Sensitive Mode (the default mode)
    • Context Sensitive statements describe actions made to GUI objects and are recommended for most situations, where the test scripts are:
      • object-based
      • not affected by user interface changes (i.e., movement of objects)
    • Software examples: menus, icons, check boxes
  2. Analog Mode
    • Analog statements are useful for literally describing the keyboard, mouse, and mouse button input of user
    • Test scripts are:
      • screen-coordinate dependent
      • based on mouse and keyboard activities (e.g., mouse movement, press, and release, and keyboard input)
      • Software examples: virtual reality environment, drawing, paint brush strokes

3. Mercury Quickest Professional

Mercury Quickest Professional™ provides the industry’s best solution for functional test and regression test automation - addressing every major software application and environment. This next-generation automated testing solution deploys the concept of Keyword-driven testing to radically simplify test creation and maintenance. Unique to QuickTest Professional’s Keyword-driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View.

Quickest Professional satisfies the needs of both technical and non-technical users. It enables you to deploy higher-quality applications faster, cheaper, and with less risk. It works hand-in-hand with Mercury Business Process Testing™ to bring non-technical subject matter experts into the quality process in a meaningful way. Plus, it empowers the entire testing team to create sophisticated test suites with minimal training.

With Quickest Professional, your QA organization can achieve a number of advantages:

  • Empower the entire team to create sophisticated test suites with minimal training
  • Ensure correct functionality across all environments, data sets, and business processes
  • Fully document and replicate defects for developers, enabling them to fix defects faster and meet production deadlines
  • Easily regression-test ever-changing applications and environments
  • Become a key player in enabling the organization to deliver quality products and services, and improve revenues and profitability

4. Comparison Matrix

Key

Parameter

Winrunner

QTP

Scripting Language used

TSL

VB Script

.Net frame work Support

Does not support .NET frame work environment(Up to 7.5v)

Supports .Net frame work environment

File Modes

GUI global mode /File per test mode

Shared repository mode/Per test repository mode

Recovery scenario

Supported

Supported

Web Testing

Supported

Supported

XML Support

Not Supported

Supported

Integrated with Quality center

Integrated with Quality center

Active screens

Not supported

Supported

Keyword view

Not supported

Supported

     
     
   

5. Scenarios

Create Object Repository Files
  • .In Winrunner, these are the “GUI Map per Test” and “Global GUI Map” settings, respectively.
  • Quickest allows you to have Object Repository file per Action (on plug-and-play basis). However, if you planning to build robust test-automation framework, you will probably want to use Shared Object Repository file

Winrunner

clip_image004

clip_image006

QTP

clip_image008

Checkpoints

As a WR expert you know that any Test Script has to have checkpoints. Besides Winrunner-like set of checkpoints you can use XML and Accessibility checkpoints.

Winrunner

clip_image010

QTP

clip_image012

Quickest offers improved checkpoint functionalities compared to Winrunner. Using Quickest checkpoints you can parameterize object properties you’d like to check, measure page load-time, check for broken links in your web page, and much more.

clip_image014

Step Generator

Similar to Win Runner’s Function Generator, Quickest 8.0 offers Step Generator. The Step Generator utility enables you to add steps in your Test Script that perform operations, using test object methods, utility object methods, or function calls. If you just started to work with QTP, you may find this utility very handy. You may access the Step Generator three ways:

  • By selecting Insert > Step > Step Generator on QTP tool bar
  • By right-clicking on object you want to perform the method on in your Active Screen, Expert View, or Keyword View, and selecting Insert Step option in the sub-menu.
  • By selecting F7 hot key from either Keyword View or Expert View.

Winrunner

clip_image016

QTP

clip_image019

As an alternative, you can insert methods in your script manually by selecting it from method list. If you type a dot ‘.’ following your object, QTP will invoke list of methods available for this object. Select desired method and follow the tool tips to insert arguments for this method.

Data Driven testing

Winrunner

clip_image021

Similar to Winrunner, QTP uses a Data Driver Wizard, where you can parameterize either all values in objects parameterization-candidates, or only desired ones.

QTP

clip_image023

It is also very useful to know that you can pass parameters in QuickTest 8.0 either by using Output Values, Environment Variables, Using Data Table method for Global or Local data sheets, or similar to WinRunner using either Test Parameters or Action Parameters.

However, unlike WinRunner, QTP 8.0 alone with Input Parameters allows you to specify Output Parameters. Output parameters - specifies the parameters that the test or component can pass to the source that runs or calls it. Also, you may specify type of the Input and Output parameter: String, Boolean, Date, Number, Password, or Any. You may specify Test Parameters selecting Test Settings > Parameters tab. Accordingly Action Parameters may be specified either by selecting Step > Action Properties from QTP tool bar, or by right clicking on action icon and selecting Action Properties from sub-menu (Keyword View only).

clip_image025

 clip_image028

As an QuickTest Experts most of your activities will be in Expert View, instead of selecting input (or output) parameters from the appropriate dialog boxes while parameterizing steps or inserting output value steps, you can enter input and output parameters as values in the Expert View using the Parameter utility object: Parameter("ParameterName").

Parameterization is very much improved in QuickTest compared to WinRunner. You can parameterize not only input and select values, but also object properties, and checkpoints, to give you more flexibility in Test Script development.

You may also create parameters using system or user-defined environment variables, random numbers, or regular expression.

Define Recovery Scenarios

Recovery Scenarios in Quickest 8.0 implemented using same Recovery Scenario Wizard as the Compound Recovery Scenarios Wizard available in Winrunner 7.5 and 7.6. In case you have not had a chance to work with these versions of Winrunner, you need to know that unlike Exception Handler utility available in previous versions of Winrunner and Quickest, Recovery Scenario Wizard in Quickest 8.0 offers the ability to create multiple recovery paths for your test including post-recovery. There are four trigger-event types of recovery scenarios: Pop-up Window, Object State, Test Run Error, and Application Crash. Some of these triggers have options using user-defined functions similar to Simple Recovery Scenarios (Exception Handlers in earlier WR versions) in Winrunner.

Exception handling in winrunner

clip_image030

Recovery scenario in QTP

clip_image032

Once you have created a recovery scenario you need to add it to Recovery Scenario List in the QTP Test Settings Recovery tab (Test > Settings > Recovery tab on QTP tool bar).

5.1. Active Screen

One of the very powerful functionalities of Quickest is Active Screen. The Active Screen is the functionality that provides a snapshot of your application, as it appeared when you performed a certain step while recording your test. Using the Active Screen you may set checkpoints after recording, create output values, or create steps using Method Argument utility.

clip_image034

0 comments:

Text Widget

Copyright © Vinay's Blog | Powered by Blogger

Design by | Blogger Theme by