Posts Tagged ‘HP QuickTest Professional’

Scripting Techniques in Test Automation

From easy techniques as record and playback to more advanced techniques like keyword driven testing we have numerous options as far as test automation is concern. The test manager has to choose wisely the technique to minimize the cost for development and maintenance. The various test automation techniques are as follows.

1.      Linear

2.      Structured

3.      Shared

4.      Data Driven

5.      Keyword driven

Linear Scripting

Linear scripting approach is simple record and playback approach of test automation. It can contain some redundant functions etc which may not be required at times.

Pros And cons of Leaner Scripting.

1.      A non-structured way of programming.

2.      Very low development cost.

3.      Programming skills required is negligible.

4.      No planning required.

5.      Data is hard coded in the script.

6.      Maintenance cost is high.

7.      No sharing of scripts done so efforts are often repeated.

Structured Programming

Structured programming uses control structures in the scripts so testers can control the flow of the test script. The control structures used are ‘if- else’, ‘for’, ‘while’, ‘select-case‘ statements which help in implementing decision making in the script, making some tasks iteratively.

Pros and cons of Structured Programming

1.      A structured approach of scripting.

2.      Dev elopement cost is relatively higher then leaner programming.

3.      Intermediate programming skills are required.

4.      To some extent planning is required.

5.      Data is hard coded in the script.

6.      Maintenance cost is relatively low comparing to linear programming.

7.      Since control structures are used so scripting efforts increases to some extent.

Shared/Modular Scripting

In this technique the scripts representing a application behavior is shared with other scripts. This means the AUT common functionality is scripted as shared scripts and will be called by other scripts to complete the test cases. So the re-usability factor is very high. This makes the scripts modular in terms of common functionality. Such scripts sometimes can be used for other applications as well.

Pros and cons of Shared Programming.

1.      Scripts are more structured then the structured approach of programming.

2.      Development costs are reduced relative to structured scripting since the effort duplication is reduced.

3.      Intermediate programming skills are required.

4.      More planning is needed comparing to structured programming.

5.      Data is hard coded in scripts.

6.      Maintenance cost is lower than linear programming.

Data Driven Scripting

This technique separates data from the scripts and stores the data in external repository in the form of files. So the script just contains the programmed code not the data. This useful when the data changes over time and cycle. Script need not be changed for change in data.

Pros and Cons of Data Driven Scripting

1.      Scripts are programmed in a structured manner.

2.      Development cost is relatively high because of parametrization.

3.      High programming skills are required.

4.     More planning is needed.

5.      Data is isolated in data tables or external files.

6.      Script maintenance is low.

7.      Recommended to be used where positive and negative testing both are involved.

Keyword Driven Scripting

In this approach the control to check and execute operations are mentained with exernal data files. So the test data and the operations of the test is planned in external data files. Extra library is needed to interpret this data in addition to the conventional script. Its an extension of data driven testing.

Pros and Cons of Keyword Driven Scripting.

1.      it combines the data driven, shared and structured programming techniques.

2.      Development cost high since testing planning effort is high.

3.      High programming skills are required by tester.

4.      Initial planning cost is high.

5.      Data exists in the external files.

6.      Maintenance cost is very low.

7.      Extra framework and library is needed and hence more programming skills is required.

This is my piece of understanding about various types of test automation scripting methodology. I am open for your comments to enhance it make it more meaningful .Please provide your valuable feedback.

Related articles by Zemanta

Enhanced by Zemanta

Everything About CheckPoints in QTP

The following section gives a gist of the Check points available in QTP (HP QuickTest Professional) . Though it doesn’t give you a practical idea but it does cover the complete theory part of the check points and types of check points.

Check Points are nothing but verification points which compares the run time value of a specific object with the recorded/expected value of that Object. In other terminology it can be called as validation points in a application.

Ex- Like when a user enter a uername and a password in a application the submit button gets activated. So the tester needs to validate that as soon as the username is entered the Submit button is activated. So in QTP with the use of check point the user can put a button/Standard check point to check whether the button is active or not.

How to Use Check points

  • Check points can be inserted/ added while recording as well as during editing of the script.
  • The check point can be inserted through the Insert menu item.
  • The check points can be inserted through the keyword view by going to the object for which check point will be added.
  • Check point can also be added through the Active screen provided the active screen has captured the property of the object for which check point will be added

Types of Check Points:-

Standard Check Point –

  • Its a normal check point where it checks the property value of an object in your application or web page.
  • It can be used on various types of object like check box,radio button, edit boxes, combo box, button etc.
  • It supports all the add-in environments of QTP.

Image Check Point:-

  • It checks the value of the Image in AUT. Ex-Check that a selected Image’s source file is correct.
  • Image check point is created as a standard check point on a Image object.
  • Image Check points are supported for only Web environments.
  • Unlike Bitmap check point Image check point can not check the bitmap of the image.

BitMap CheckPoint –

  • This check point helps user in checking bitmap of an image or a full web page.
  • During run time the bit map check point can be inserted.
  • Bit map checkpoints are supported for all the add-in environments.

Table Checkpoints:-

  • It checks the information within the table.
  • its created  by inserting a standard check point on a table object.
  • it supports only web and ActiveX environments.
  • It can dynamically check the contents of cells appearing in all environment.
  • It can also check verious table properties like row height, cell width and so on.

Text Checkpoints:-

  • checks that a text string is displayed in the appropriate place in the AUT.
  • it supports all the environments.

Text Area CheckPoints:-

  • It checks that a text string is displayed within a defined area in a windows application according to specified criteria.
  • It support for standard windows, visual basic, ActiveX add-in environments.

Accessibility CheckPoint:-

  • It checks the areas of your website that may not conform to the world wide web consortium (W3C) Web Content Accessibility guidelines.
  • It supports only Web Environments.
  • The user can be instruct QTP for inserting automatic accessibility check point for every page you record.

Page CheckPoints:-

  • Checks the characteristics of a web page.
  • Its created by entering a standard checkpoint on a Page Object.
  • It supports only web environment.
  • Its used to check total number of link and images in the web page.
  • Page check points can be used to check Load time.
  • It can also check the HTML source tags and broken links.
  • Useful for regression testing.

Database CheckPoints:-

  • Checks the content of a database used in AUT.
  • it supports all environments.

XML CheckPoint:-

  • It checks the data content of XML documents in XML files or XML documents in web pages and Frames.
  • XML check points for web pages/frames are supported for Web environments and for Files are supported by all environments.


– Standard check point is supported in all add-in environments.

– the Insert statement option is not available while adding a check point during recording and when modifying an existing object check points.

Please have a look to this and share your comments and feedback to enhance this.

Enhanced by Zemanta
%d bloggers like this: