Book Image

Designing and Implementing Test Automation Frameworks with QTP

By : Ashish Bhargava
Book Image

Designing and Implementing Test Automation Frameworks with QTP

By: Ashish Bhargava

Overview of this book

<p>As software testing is maturing, the focus is shifting towards test automation. The key is to learn and grow skills in framework designing and start contributing to project organization goals.</p> <p>Through a helpful mix of conceptual and practical aspects, you will learn everything you need to know related to the implementation of frameworks using QTP. Through simple examples, you will gradually develop the skills needed to execute concepts and code blocks used to design and implement the test automation framework.</p> <p>This tutorial-based guide demonstrates an easy way to implement concepts to create a portable framework across the various versions of QTP. You will learn about the automation lifecycle and gradually develop technical concepts related to each phase. Within a short amount of time, you will be able to deal with challenges in test automation. "Designing and Implementing Test Automation Frameworks with QTP" uses a simple, yet elegant approach and gives the reader all the skills and knowledge they need to implement the framework.</p>
Table of Contents (15 chapters)
Designing and Implementing Test Automation Frameworks with QTP
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Automation Life Cycle and Automation Goals
Index

Record and replay


Recording is a process of capturing human actions performed on AUT and simultaneously creating a script, which can be replayed on AUT many times.

What happens when we record

When a user records the scripts, QTP perform various tasks as shown in following steps:

  1. QTP uses a test object model. It identifies the test object and operation performed on an object that belongs to AUT.

  2. Then it stores the test object in a local object repository on which the user performed the action.

  3. Object identification properties of the test object are captured, which allows identification of the object uniquely at time of replay.

  4. It provides a logical name to a test object, which makes objects' names readable.

  5. Create a test step; a test step contains test objects including parent(s), operation, and data, if applicable. The following code is an example of the test step:

Dialog("Login").WinEdit("Agent Name:").Set "ashish"

In the previous test step, Dialog is the class name, Login is its logical name, and...