SlideShare a Scribd company logo
Actions in QTP – The Basics
By Chandrika
What you would read in this PPT:
 What are QTP Actions.
 What are the different types of QTP actions.
 How actions access data from QTP data tables.
 How to call actions in your QTP scripts.
What is a QTP Action?
QTP Action is a placeholder or a component in which you can write your
scripts or code.
You can write your code in QTP actions in the same way you do in a
function library or scripted business component.
Just like functions, actions also help to divide your test script into logical
units or business flows.
In fact, a QTP test script is itself a collection of one or more actions.
Whenever you create a new test case, an action will also be created
automatically for that test case.
What is a QTP Action – contd..
Each test case in QTP consists of one or more actions and the flow of the
test case is determined by the order of action calls.
Example: Consider a scenario where you
login to gmail >> send an email >> logout from gmail
This scenario can be scripted by adding 3 actions in a QTP test script as –
What is a QTP Action – contd..
Modularization provided by actions is similar to what is there with
functions. Only difference is the implementation.
.. is similar to ..
Different Types of QTP Actions
QTP actions can be classified into the following different types -
Different Types of QTP Actions
NOTE: QTP documentation doesn’t specify an action type as ‘Internal’. We have just extended the ‘External
Action’ type to come up with ‘Internal Action’.
Different Types of QTP Actions – contd..
QTP actions can be classified into the following different types -
Reusable Actions : These are the actions
that can be called multiple times by –
- the same test in which it is stored, and
- by other external tests also.
Non-Reusable Actions : These are the
actions that can be called only once and
that too in the test where they are stored.
These can’t be called from external tests.
Internal Actions : With reference to a
QTP test case, an internal action is one
that is stored within that test case.
This action can be reusable as well as
non-reusable.
External Actions : With reference to a
QTP test case, an external action is one
that is stored in some other test case.
External actions should be reusable
otherwise it can’t be used outside the
test case.

More Related Content

PPTX
Refactoring: Improving the design of existing code. Chapter 6.
PPTX
Actions in QTP
PPTX
scope of python
PPT
1.qtp basics
PPTX
2CPP12 - Method Overriding
PPTX
2CPP11 - Method Overloading
PPTX
QTP Automation Testing Tutorial 6
PPTX
QTP Automation Testing Tutorial 7
Refactoring: Improving the design of existing code. Chapter 6.
Actions in QTP
scope of python
1.qtp basics
2CPP12 - Method Overriding
2CPP11 - Method Overloading
QTP Automation Testing Tutorial 6
QTP Automation Testing Tutorial 7

What's hot (20)

PPTX
QTP Automation Testing Tutorial 5
ODP
Pluggable Pipelines
PPTX
QTP Automation Testing Tutorial 2
DOCX
QTP AUTOMATION TESTING SYLLABUS
DOC
Qtp faqs
PPTX
QTP Automation Testing Tutorial 3
PDF
Pro smartbooksquestions
PPT
QTP Slides Presentation.
PPT
First QTP Tutorial
PPT
SP_Homework_3
DOC
Qtp certification questions and answers
PPTX
QTP Power Point Presentation
ODP
Refactoring: Improving the design of existing code
PPTX
Presenter deck icenium hol
PDF
Basics of QTP Framework
PPT
Qtp Presentation
PPT
Copy of qtp presentation
PPTX
FUNCTION CPU
DOCX
Types of storage class specifiers in c programming
PDF
Traits: Introduction to Define Shared Behavior
QTP Automation Testing Tutorial 5
Pluggable Pipelines
QTP Automation Testing Tutorial 2
QTP AUTOMATION TESTING SYLLABUS
Qtp faqs
QTP Automation Testing Tutorial 3
Pro smartbooksquestions
QTP Slides Presentation.
First QTP Tutorial
SP_Homework_3
Qtp certification questions and answers
QTP Power Point Presentation
Refactoring: Improving the design of existing code
Presenter deck icenium hol
Basics of QTP Framework
Qtp Presentation
Copy of qtp presentation
FUNCTION CPU
Types of storage class specifiers in c programming
Traits: Introduction to Define Shared Behavior
Ad

Similar to Qtp actions-the-basics (20)

DOC
Qtp material for beginners
DOCX
Qtp basic
DOC
Qtp stuff
DOC
Qtp basic stuff
DOC
What are the features in qtp
DOC
Qtp interview questions
DOC
Qtp interview questions
DOC
Interview qutions
PPTX
Automation Tool QTP
PDF
Qtp Interview Questions
DOCX
Qtp basics
DOC
Qtp interview questions and answers
DOC
Qtp interview questions and answers
PDF
Write unit test from scratch
PPT
Qtp Basics
PPT
Qtp 8.0 basic
PPT
Qtp 80 Basics3561
PPTX
Unit 5 Activity and Activity Life Cycle.pptx
PDF
QTP Descriptive programming Tutorial
PPT
Variables Arguments and control flow_UiPath.ppt
Qtp material for beginners
Qtp basic
Qtp stuff
Qtp basic stuff
What are the features in qtp
Qtp interview questions
Qtp interview questions
Interview qutions
Automation Tool QTP
Qtp Interview Questions
Qtp basics
Qtp interview questions and answers
Qtp interview questions and answers
Write unit test from scratch
Qtp Basics
Qtp 8.0 basic
Qtp 80 Basics3561
Unit 5 Activity and Activity Life Cycle.pptx
QTP Descriptive programming Tutorial
Variables Arguments and control flow_UiPath.ppt
Ad

Qtp actions-the-basics

  • 1. Actions in QTP – The Basics By Chandrika
  • 2. What you would read in this PPT:  What are QTP Actions.  What are the different types of QTP actions.  How actions access data from QTP data tables.  How to call actions in your QTP scripts.
  • 3. What is a QTP Action? QTP Action is a placeholder or a component in which you can write your scripts or code. You can write your code in QTP actions in the same way you do in a function library or scripted business component. Just like functions, actions also help to divide your test script into logical units or business flows. In fact, a QTP test script is itself a collection of one or more actions. Whenever you create a new test case, an action will also be created automatically for that test case.
  • 4. What is a QTP Action – contd.. Each test case in QTP consists of one or more actions and the flow of the test case is determined by the order of action calls. Example: Consider a scenario where you login to gmail >> send an email >> logout from gmail This scenario can be scripted by adding 3 actions in a QTP test script as –
  • 5. What is a QTP Action – contd.. Modularization provided by actions is similar to what is there with functions. Only difference is the implementation. .. is similar to ..
  • 6. Different Types of QTP Actions QTP actions can be classified into the following different types - Different Types of QTP Actions NOTE: QTP documentation doesn’t specify an action type as ‘Internal’. We have just extended the ‘External Action’ type to come up with ‘Internal Action’.
  • 7. Different Types of QTP Actions – contd.. QTP actions can be classified into the following different types - Reusable Actions : These are the actions that can be called multiple times by – - the same test in which it is stored, and - by other external tests also. Non-Reusable Actions : These are the actions that can be called only once and that too in the test where they are stored. These can’t be called from external tests. Internal Actions : With reference to a QTP test case, an internal action is one that is stored within that test case. This action can be reusable as well as non-reusable. External Actions : With reference to a QTP test case, an external action is one that is stored in some other test case. External actions should be reusable otherwise it can’t be used outside the test case.