QTP Test Process
QTP Testing Process
- Analyzing the AUT in terms of Object Identification
(Object Identification is an important task in Functional Test Automation, based on Objects only QTP performs Test Operations.
To verify if the QTP is identifying our entire Application objects or not, we can use either Object Spy feature, Recording feature or View options in the Object Repository.)
(Generally we select Sanity Tests, Regression Tests, Data Driven Tests and Operations having complex functionality for Test Automation)
- Automation Framework Implementation
(It is a systematic Approach to automate Software Test Process.)
- QTP Tool Settings Configuration
(QTP has some configurable features apart fro constant features like Active screen, Accessibility Checkpoint and Object Identification etc. We need to configure them according to our project)
II) Generating the Basic Tests
a) Repository based Test Design
i) Recording (Local Repository)
It is process of generating statements for each add every user operation on AUT, simultaneously adding objects information into Object Repository.
ii) Keyword driven methodology (Shared Repository)
It is process of generating tests manually using shared object repositories.
b) Descriptive Programming
i) Static Programming
Entering/Providing Objects Information (Properties & Values) directly in the Test Script.
ii) Dynamic Programming
Creating Collection Objects, entering Properties Information and generating Tests using Collection Objects
III) Enhancing Tests
- Inserting Checkpoints
There are 11 checkpoints available in QTP, in which 8 are direct checkpoints, remaining are hidden checkpoints
Checkpoint is a verification point takes expected result from the user and compares with actual result during execution and provides Test Results.
- Inserting Output values
There are 6 Output values available in QTP
Output Value captures output during execution and stores in to run-time data table.
- Adding Comments
In order to provide readability for Our Tests, we have to add comments.
It is a process of matching the speeds of both QTP and AUT in order to get proper test execution and Results.
It is a process of passing parameters instead of Constant values. We use this feature in Data driven testing.
- Inserting Flow Control Statements
We insert VB script Flow Control Statements (Conditional and Loop) for verifying our requirements.
- Calling Functions/Actions
Functions and Actions are reusable components; we use them in our tests in order to optimize our tests. Function is a VB script feature and Action is a QTP tool feature.
- Generating Steps though Step Generator
It is a library of VB script built-in functions, Utility objects, used to generate recordable and non recordable statements.
It is a QTP Tool feature, using this we can generate object call statements, utility statements and VB script built-in function statements.
- Inserting Transaction Points
QTP Supports little bit Performance Testing; we can insert transaction points to measure transaction time. We can measure entire test transaction time as well as partial test transaction time.
- Using Regular Expressions
We use Regular Expressions for matching patterns, using this we can handle dynamic objects, verify data types and perform search operations.
- Using Environment Variables
Environment Variables are global Variables depends on local Computer environment. The advantage of using Environment Variables is centralized maintenance.
- Using Automation Object Models
Using VB Script Object Models (FileSystemObject, Word, excel and Database), we can perform file system, word document, excel file and database operations.
- Error Handling
It is a best practice as well as mandatory task in any programming or scripting language. We have to handle expected and unexpected errors in our tests in order to get smooth execution.
IV) Debugging Tests (Optional)
It is process of locating and isolating errors through step by step execution.
Generally scripting languages are light weight languages, user no need to compile scripts separately, during execution they automatically compile.
- Debug Commands & Break Points
- Step by step execution
- Watching Variables
- Changing values of variables
V) Running Tests
- Normal Execution
- Batch Testing / Batch Execution
QTP supports Series of tests execution, to do this QTP provided a separate tool called “Test Batch Runner”.
- Running Tests through AOM Scripting
- Running Tests through framework
VI) Analyzing Results
Actually Analyzing Results is not the responsibility of QTP, user has to analyze the Test Result, but QTP has provided necessary interface and features.
- QTP Result window
QTP Provides Test Result for every Test iteration, we also export Test Result in HTML, Doc and PDF formats.
- Defining Test Results
When we use QTP Tool features for verifications and others then QTP can provide Test Result. If we use our own logic then we need to define Test Result.
- Exporting Test Results
We can export Test result through the Automation Framework.
- Deleting Test Results
We can delete Test Results, to do this QTP has provided a separate tool called “Test Results deletion Tool”.
VII) Reporting Defects
- Manual Defect Reporting
- Tool based Defect Reporting
- Working with Quality Center
In between QTP and Quality center 2-way integration available, we can send defects directly from the QTP Result window.