QTP Tutorial #21 – How to Make QTP Tests Modular and Reusable Using Actions and Function Libraries

QTP Actions and Action Properties:

Actions divide a test into logical units. This aids in highly readable tests and make sure that modularity is achieved.

There are 3 types of QTP actions:

  1. Reusable – only these can be called multiple times within the same or different tests
  2. Non-reusable – These cannot be called by any other actions
  3. External actions – a reusable action when called from another action becomes an external action in the called action.

How to use QTP Actions in tests?

1) By default all new actions are reusable

Continue reading →

Parameterization in QTP (Part 2) – QTP Tutorial #20

In part 1 of this QTP Parameterization tutorial, we explained Datatable Parameterization with an example. In this QTP tutorial let’s focus on remaining three techniques for parameterization in QTP:

2) Random number parameters
3) Environment variable parameters
4) Test/Action parameters

#2 – Parameterization in QTP using Random Number

If a certain field needs to have any number within a certain range you can specify the same using QTP. In the Value configuration properties screen, select “Random number” and the following options come up:

Continue reading →

Parameterization in QTP Explained with Examples (Part 1) – QTP Tutorial #19

What is QTP parameterization?
Sometimes the application does not accept the duplicate data records. In this case, if you run same test script with a fixed set of input data, an application may throw an error due to data duplication. To avoid this issue, QTP provides ways to accept different test inputs to the test script. This process of providing different input values through external parameters is called as parameterization

Types of parameterization in QTP
The variable value can be or the parameter types can be:

  1. Data Table parameters
  2. Test/Action parameters
  3. Environment variable parameters
  4. Random number parameters

Continue reading →

QTP Tutorial #18 – Data Driven and Hybrid Frameworks Explained with QTP Examples

We are working our way through figuring out how to derive at an automation framework that works best for a certain testing project and also is defining certain frameworks that already exist.

The example that we were using in the previous QTP framework article was creating a new Gmail account.

To start with, we coded the creating a new account scenario just by recording and playback in a linear fashion. Seeing how it lacked in modularity, readability and reusability we broke it down into functions that would be referenced as keywords moving forward.

We did achieve modularity, readability and reusability through this method but we needed to make the program even more robust so that it can take different sets of values without having to modify the script itself.

Continue reading →

QTP Frameworks – Test Automation Frameworks – Keyword Driven and Linear Framework Examples – QTP Tutorial #17

What is Test Automation Framework and what is QTP Framework?

In the context of a successful implementation of QTP for a software testing project we often come across the concept of frameworks. The framework is nothing but the approach that we consistently follow during the automation process – a set of guidelines.

Personally, I don’t like to give names and say that one works better than the other. The selection of a certain framework is not the beginning of a project. It is the reverse that is true. In the process of devising a testing strategy, you build the rules that are applicable to the tester’s current situation and that right there is your framework.

Having said that, the following are some of the important points we need to consider:

  1. Reusability
  2. Script’s easy maintenance Continue reading →