Today we are releasing the first part of a series of guest posts on Micro Focus Quick Test Professional (QTP). In this comprehensive QTP training series, we will cover all QTP tutorials and concepts in detail, with clear illustrations. Our expert author Swati S. will assist in bringing this series to our readers.
These QTP tutorials are designed for novice to advanced users. Starting from the basics, you will learn advanced scripting with practical examples for better understanding.
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
IMPORTANT: The text tutorials below provide sufficient information to get started with learning the QTP Automation tool. However, if you are interested in hands-on QTP training, please check out our comprehensive QTP video course by experienced professionals.
Considering the extensive list of these QTP tutorials, we will be publishing new articles regularly. Make sure to keep track of all articles in this Quick Test Professional Online training series to avoid missing any topics. Follow the topics closely, practice at home on the QTP trial version, and ask your questions in the respective article comment section. We will ensure that all relevant questions are answered.
If you are an expert QTP user, we encourage you to share your experience to enhance this QTP training series. Feel free to discuss advanced QTP concepts and answer readers’ questions.
What You Will Learn:
QTP Training Series Tutorials
- Tutorial #1: Introduction to QuickTest Professional (QTP)
- Tutorial #2: Working with QTP Keyword View and Expert view
- Tutorial #3: Adding Standard Steps From Keyword View
- Tutorial #4: Conditional & Loop Statements in Keyword View
- Tutorial #5: Moving Steps and Dealing with Breakpoints
- Tutorial #6: Understanding QTP Record and Run Settings
- Tutorial #7: How QTP Identifies Objects Uniquely? (Must Read)
- Tutorial #8: Recording Modes, Object Spy and Repositories
Learn VB Scripting
- Tutorial #9: VBScript Tutorials – A Complete Guide
- Tutorial #10: VBScript Basics to learn QTP – Tutorial 2
- Tutorial #11: Use of Password Encoder and Active Screen
- Tutorial #12: Expert View, Step Generator and Checkpoints
- Tutorial #13: Inserting Standard and Image Checkpoint
- Tutorial #14: Inserting Bitmap and Text Checkpoints in Tests
- Tutorial #15: Using Text Area, Table, and Page Checkpoints
- Tutorial #16: XML, Accessibility, and Database Checkpoints
Test Automation Frameworks
- Tutorial #17: Automation Frameworks Part-1 (Must Read)
- Tutorial #18: Test Automation Frameworks Part-2
Enhance Your Tests
- Tutorial #19: Parameterization in QTP Part-1
- Tutorial #20: Parameterization in QTP Part-2
- Tutorial #21: Actions and Function Libraries
- Tutorial #22: Using QTP Object Repositories
- Tutorial #23: Smart Object Identification & Test Result Analysis
- Tutorial #24: Virtual Objects and Recovery Scenarios
- Tutorial #25: Descriptive Programming
Test Your Understanding
Here is the first article in this QTP training series – “Introduction to QuickTest Professional (QTP)”
Introduction To QuickTest Professional (QTP)
What is QTP?
Micro Focus’s Quick Test Professional (QTP) is a software that enables Automation Testing for software applications, specifically Functional and Regression testing. QTP provides a user interface that serves as an Integrated Development Environment (IDE) for creating and executing tests.
The IDE offers various features to assist testers in developing comprehensive test scripts that effectively validate the purpose of the tests. These features will be explained further in the upcoming articles in this series.
Some key aspects of QTP include:
- QTP utilizes VB Script as its scripting language (the scripting language interpreted at runtime).
- QTP is compatible only with the Windows operating system.
- The current version of QTP is 11.0 (Latest version of Unified Functional Testing – UFT 11.5).
- QTP supports various technologies such as Web, Java.Net, SAP, Oracle, Siebel, PeopleSoft, Web Services, and multiple major languages. However, some older versions may not support all the listed technologies.
How Does it Work?
The basic approach for test creation in QTP is record and playback. But what does that mean? Let’s start with the “Record” phase. When a tester launches QTP and performs a series of operations on the Application Under Test (AUT), QTP generates lines of code that correspond to each operation.
These recorded operations form the foundation of the test script. Moving on to the “Playback” phase, when the test script is executed, QTP performs the exact same operations on the AUT, reproducing the sequence of steps recorded during the “Record” phase.
For example, if I launch QTP and access the login page of a web-based email program, enter the login ID, password, and click the OK button, these actions are recorded by QTP as VBScript code in the IDE. When I save and play back the test script, QTP will automatically enter the same login ID, password, and click the OK button.
While this serves as the fundamental approach for test creation, record and playback alone may not be sufficient for creating robust test scripts. Testers need to utilize additional features in the IDE along with programming skills to achieve the desired results.
Before recording and playing back a test script, it is important to consider various technical aspects, such as the AUT’s current state, synchronization, accurate menu options, code generated by QTP, and more. These aspects will be covered in detail as we explore the tool’s basic concepts.
Here’s how it works: QTP identifies various objects in the AUT using their names, handler IDs, or other unique properties. During the recording phase, QTP captures these properties, and during playback, it performs desired operations (e.g., mouse clicks, checkbox checking) on these objects.
What Will You Need to Get Started with QTP?
To get started with QTP, you will need a valid QTP license or, as a learner, a trial version installed on your computer.
QTP Download: You can download the QTP trial version from this link. On the linked page, go to the “Trials and Demos” tab and select the “Micro Focus QTP Essentials 11.0 English Evaluation (web GUI Testing only)” option. You can also choose the latest version of Micro Focus Unified Functional Testing 11.50 CC English SW E-Media Evaluation.
If you need detailed instructions on downloading and installing the QTP trial version, please let us know. QTP offers two types of licenses: seat license (for a single machine at a time) and concurrent/floating license (for a specific number of concurrent users).
Now that we have some background information about QTP, let’s explore the tool itself, starting with the user interface (UI).
When a test is recorded or created, it can be viewed in either of these two views:
- Keyword view: This view presents a tabular representation of objects and the actions performed on them. Each row in the table represents a step performed on the AUT and can be modified. Commonly displayed columns include item, operation, value, and documentation.
- Expert view: As the name suggests, this view is for advanced users who prefer to modify the source code as per their requirements.
Both views are available simultaneously, allowing users to switch between them during test creation or modification.
Let’s record a simple test to get started:
Step #1: Launch QTP. The Add-in manager will appear, displaying all available add-ins. Users can select or deselect the add-ins as needed. By default, Active-X, Web, and Visual Basic are included. (This feature can be disabled if required).
Step #2: After clicking OK in the Add-in Manager, the start page will appear.
Step #3: Choose the “Record” option (F3 key), and the “Record and Run Settings” screen will appear with “Web” and “Windows Application” tabs. Click OK without modifying any settings. We will cover the features of this screen in detail later.
Step #4: For our example, let’s launch the ‘Flight’ application from the provided samples in QTP. We will enter the ‘Agent Name’ and ‘Password’ on the Login screen. Let’s examine the code generated by QTP.
The following code is from the keyword view. As you can see, the actions are presented in a table format with columns for item, operation, value, and documentation. The item corresponds to the object in the AUT on which an action is performed, the operation represents the action itself, the value refers to the data set for the object, and the documentation provides a description.
The corresponding source code in the expert view looks like this:
Step #5: Modifications can be made to the code from either view.
This article covered the following topics:
QTP is software that facilitates automated Functional and Regression testing of software applications. It exclusively operates in the Windows environment and utilizes VB script as its scripting language. The creation of a test primarily follows the record and playback method, although additional features are often necessary. QTP offers seat and concurrent licenses to cater to different needs.
The default add-ins in QTP are Active-X, Web, and Visual Basic. Tests can be recorded on web or windows applications; the specific details are provided in the record and run settings pop-up window. The GUI offers two views: Keyword and Expert.
The Keyword view presents an object-based tabular representation of the test, including details like object names, operation descriptions, and values. The Expert view displays the actions performed on the AUT in the form of source code.
To enhance your tests, you can add or remove additional operations on test objects from either the Keyword view or programmatically from the Expert view. More details on this will be covered in the next article.
About the Author: This article series is written by Swati, who aims to provide a comprehensive learning experience for QTP beginners. With over 4 years of experience working on QTP as part of her 8-year QA journey, she recognizes the immense potential of Automation Testing. Through these articles, she seeks to explore that potential together with our readers.
Interested in learning QTP from Experienced Professionals? Join Our Online Video Training Course
Feel free to join and share this FREE QTP training series with your friends. Ask your questions in the comments below. Bookmark this page to stay updated on all QTP tutorials.