QTP Tutorials – 25+ Micro Focus Quick Test Professional (QTP) Training Tutorials

Today we are publishing part one of a multi-part guest post series on Micro Focus Quick Test Professional (QTP). In this multi-part QTP training series we’ll be covering all QTP tutorials and concepts in detail with adequate illustrations. Our expert author Swati S. will be helping us in bringing this series to our readers.

These QTP tutorials are designed for beginners to advanced users. Starting from QTP basics you will learn all advanced scripting with practical examples for your easy understanding.

QTP Tutorials

NOTE: The below text tutorials are enough for you to get started with learning on the QTP Automation tool. But if you are interested in hands-on QTP training, then please check our Comprehensive QTP video course by the experienced professionals.

Considering the big list of these QTP tutorials, we’ll be publishing new articles frequently. Keep track of all articles in this Quick Test Professional Online training series so that you won’t miss any topic. Follow the topics closely, practice at home on the QTP trial version and ask your questions in the respective article comment section. We will make sure all relevant questions get answered.

If you are an expert QTP user, please share your experience to improve this QTP training series by discussing advanced QTP concepts and answering the readers’ questions.

QTP Training Series Tutorials

QTP Introduction

Learn VB Scripting

QTP Checkpoints

Test Automation Frameworks

Enhance Your Tests

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 facilitates Automation Testing for software applications – Functional and Regression testing to be more specific. QTP comes with a user interface that can be considered an Integrated Development Environment (IDE) for the test itself.

IDE has various features that aid the tester in developing a comprehensive script that would successfully validate the purpose of the test. All these features will be discussed in detail as we proceed through the series of these articles.

Some of the important aspects of QTP:

  • It uses VB Script as its scripting language (The scripting language is the one that gets interpreted at runtime).
  • QTP runs only in a Windows environment.
  • The current version of QTP is 11.0 (Latest version of Unified Functional Testing – UFT 11.5)
  • The technologies it supports are Web, Java.Net, SAP, Oracle, Siebel, PeopleSoft, Web Services, and many major languages. However, some of the older versions don’t support all the technologies listed.

How Does it Work?

The basic test creation method is record and playback. What does this really mean? Let’s talk about “Record” first. When a tester launches QTP and performs a series of operations on the AUT (Application Under Test) QTP generates lines of code that correspond to each operation performed.

This will be the basic test script. Moving on to ‘Playback’. When the test script created is run, it performs the exact same operations on the AUT thus playing back the sequence of steps already recorded.

For Example, when I launch QTP and try to access the login page of a web-based email program, I enter the login ID, Password and press the OK button. These actions are recorded in their equivalent VBScript lines of code in the QTP IDE. When I save this test script and play it back, QTP will enter the same login ID and Password I entered before and clicks on the OK button for me.

Now this being the gist of the basic test creation technique, record and playback are not always sufficient for a robust test script. The tester will have to use the other features in the IDE in conjunction with a few of his programming skills to achieve the required results.

There are various technical aspects to be taken into consideration before we attempt to record and playback, like the state of the AUT, synchronization, the exact menu options, the exact code that QTP generates, etc. We will get to that as soon as we discuss the basic concepts of the tool itself.

Here’s how all this works. QTP identifies the various objects in the AUT by a name or handler ID or any other unique property/properties that the object possesses. During the recording phase, it captures all these properties and during playback, it performs the desired operations like a mouse click, checkbox checking, etc. on these objects.

What Will You Need to Get Started with QTP?

A valid QTP license or in the case of a learner a trial version on their computer.

QTP Download: Here is a link to download the QTP trial version: Download Micro Focus Unified Functional Testing (UFT).

In the above link, 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 select the latest version of Micro Focus Unified Functional Testing 11.50 CC English SW E-Media Evaluation.

Let us know if you want more detailed instructions on downloading and installing QTP trial version on your machine. There are two kinds of licenses i.e. Seat license and concurrent/floating license. Seat license is for a single machine at one time whereas a current license is for a particular number of concurrent users.

Now that we have some background information about QTP, let’s examine the tool itself starting with the UI.

QTP GUI:

When a test is recorded or created, it can be viewed in one of these two views:

  • Keyword view: This view is a tabular representation of all the objects and the actions that are performed on them. Every row in the table is a step performed on the AUT and can be modified. Some of the most common columns displayed are the item, operation, value, and documentation.
  • Expert view: As the name indicates, this view is for more technical users who would like to tweak the source code as per their requirements.

Both views are available simultaneously so the user can switch between them anytime during test creation or modification.

Let’s record a little something to get started

Step #1: Launch QTP. The first thing that comes up is the Add-in manager. It displays all the add-ins that are available and the user can check or uncheck the ones as needed. Active-X, Web and Visual Basic are available by default. (This feature can be turned off if required).

QTP Add-in manager

Step #2: On Clicking OK in the Add-in Manager QTP, the start page comes up.

QTP start page

Step #3: On choosing the “Record” option (F3 key) the “Record and Run settings” screen comes up with “Web” and “Windows Application” tabs. Click OK without changing any settings. However, all the features of this screen will be discussed at length later on.

QTP Record and Run settings

Step #4: For our example, I am going to launch the ‘Flight’ application from the samples that come with QTP. I am going to enter the “Agent Name” and “Password” on the Login screen. Now, let’s examine the code it generates.

The following is the keyword view. As you can see, the actions are in the form of a table with columns: Item, Operation, Value, and Documentation. The item corresponds to the object in the AUT on which we performed an action, the operation is the action itself, value is a data we set the particular object to and documentation is more or less like a description.

QTP keyword view

The corresponding keyword view for the same test is as follows: As you can see, this view contains the source code for all the actions performed.

QTP keyword view source code

Step #5: The code can be manipulated from either of these views.

Conclusion

Here is a list of everything we discussed in this article.

QTP is a software that aids automated Functional and Regression testing of software applications. The current version runs only in a Windows environment and uses VB script as a scripting language. The basic method for the creation of a test is Record and Playback, although that’s not always sufficient. It comes with two kinds of licenses, seat and concurrent.

The default add-ins are Active X, Web, and Visual Basic. Tests can be recorded on a Web or Windows application; specific details are to be provided in the record and run settings pop-up window. The GUI provides two views: Keyword and Expert.

The Keyword view is a tabular form that shows details like the name of the objects, its value, and the operation performed, etc. The Expert view displays the performed actions on the AUT in the form of source code.

Additional operations to be performed on the test objects can be added or deleted either from the Keyword view or programmatically from the Expert view. More details on this in the next article.

About Author: This is Swati and with these articles, I am trying to establish a comprehensive learning experience for QTP beginners. Having worked for more than 4 years on QTP in my overall 8 years of life as QA, I realize that the potential for Automation Testing is immense. I attempt to exercise that very potential collectively with all our readers through these articles.

Want to learn QTP from Experienced Professionals? Join Our Online Video Training Course

Please join and share this FREE QTP training series with your friends. Ask your questions in the comments below. Bookmark this page as we’ll be updating links to all QTP tutorials from here.

Recommended Reading

190 thoughts on “QTP Tutorials – 25+ Micro Focus Quick Test Professional (QTP) Training Tutorials”

  1. hiii i m in testing field since last 6 months and i m working in manual testing only,but now i want to learn automation,so i thought qtp will be the right choice to start with and i m getting great help from u to start learning qtp……….

    Reply
    • Start with Selenium, Eclipse and Xpaths. That will be useful as a beginner.

      Reply
  2. can u give a suggestion how do i get knowledge on vb script as i dnt know any thng about it,,,,,,,,,,,,,as i m fresher and have only 6 months experience in manual testing

    Reply
  3. Hi Swati,
    Can we install UFT on Windows 7 machine? To practice.

    Reply
  4. Hi friends,
    I am Devi. Post 2 years I am working in manual testing. Right now I am moving to QTP. Little bit knowledge only I am having QTP. Where ever go there Flight reservation project only teaching. I no need that. I want work in real time project. Please anyone help me which is best institution to learn QTP and Real time project teaching in Chennai? Please help me

    Reply
  5. help me what to do before i start qtp learning

    Reply
  6. Can any one let me know is there any bright future if i learn QTP Testing

    Reply
  7. Dear sudhakar,

    HI I am a test engg. at a semi govt organization, we have started using QTP 11 and we hav a doubt .

    Is it possible dat we can check the parametrized value of data table with the final outcome.

    like in a case of a web form we parametrised all fields of a registration form , now we have to check that the receipt generated is having the same values entered.

    Plz help me and revert me on my mail id if possible.

    Reply
  8. how is hp sprinter different from UFT/QTP .. kindly email me soon.. I recently came across sprinter..

    Reply
  9. Hi, I am trying to validate if a webelement property exists on the page or not. But QTP always returns true Sad and not moving to ‘Else’ part . Below is my code. pls help Sad
    ************************************************************
    BlnResult = Browser(“CDMS :: Master Agreement”).Page(“CDMS :: Master Agreement”).WebElement(“File Upload successfully”).Exist(0) Then
    Msgbox “Success”
    Else
    Msgbox “Fail”
    End If
    ************************************************************
    QTP always returns “true” even in case if web element doesnt exist on the page. when tried doing object spy, QTP recognizes the page, but not highlighting anything. Does it mean the object exists (like Hidden ). ? somebody Please help

    Reply
  10. Hi,
    I tried to download HP Unified Functional Testing 12.02 Software Evaluation. But in the personal information section it asks for company name and as I am unemployed, I do not understand what to do. Please help me with it.

    Reply
  11. Hi,

    I downloaded HP Unified Functional Testing 12.02 Software Evaluation. But while installing I got an error saying “Error reading from file (file path).. Verify that the file exists and that you can access it”. I am not gettig what to do. Please help me out

    Thanks.

    Reply
  12. Hi,
    do i need to learn VB before QTP.

    Reply
  13. What is the difference between functional and regression testing?

    Reply
  14. I am looking for a certification in QTP, Could you please share the details regarding the same

    Reply
  15. Hello,
    Outstanding tutorial!! I look forward to becoming more versed with QTP with the assistance of these tutorials! Thank you!!!

    Reply
  16. Hi,

    I have some scripts developed in QTP 11 as the version is upgraded to UFT 12.02. Can some one help me open the older scripts developed in QTP 11 in write mode in UFT 12.02. Currently the scripts open in read only mode.

    Thanks,
    Rupali

    Reply
  17. Hi, I want to install QTP on my 64 bit Win 7 Laptop. Could you please assist.

    Reply
  18. YES I AM START THAT DAY QTP, I RESOLVE THAT SCRIPT RECORD THATS MORE HELPFUL……I HAVE NOT QTP UPDATED STUP PLEASE GUID ME

    Reply
  19. Hi,
    I had made an online transfer of Rs.5990 to via NEFT in order to obtain access to the QTP video recording tutorials. It has been 3 days since I made the transfer but I am yet to get access. I have been dropping mails to various emails/options provided on the web site. Ca n the site owners please confirm and do the needful?
    Regards

    Reply
  20. while installing QTP 10 in my lap getting error, showing message is your setup is pending please sugggest team

    Reply
  21. Dear Swati,
    and the entire Software testing help site
    thank you, I am blessed to have come through this
    this very positive and inspiring, please know that
    you have actually started today to contribute to my success and with there are many so we thank you for lectures and keep up the Awesome/great/Inspirational work

    Reply
  22. Hi,
    I am learning HP Unified Functional Testing version 12.51.
    I have tried several times to perform the basic testing, where I start the recording, then open the browser, go to facebook, type random email and password, it does not me through. I close the browser, stop the recording.
    However, when I play the recording it performs exactly what I did till it stops in the last action, when I closed the windows.
    It shows this “Window(“Window”).Click 394,132″.
    Can someone please help me understand that why I am getting this error.
    I am very grateful for your help.

    Reply
  23. Hi,
    I have started to learn VBScripting and have few doubts can you please clear my doubt.
    while creating filesystmobjects in VBscripting we write syntax as
    set objFso = createobject(“scripting.Filsystemobejct”)
    but while creating excel object why do we write as
    set objExcel = crateobject(“excel.application”)
    why do we not us scripting here.

    Reply
  24. What are containerobjects in QTP?

    Reply
  25. Hi Swati,
    I started learning UFT(QTP) 12.50, i am finding difficulties in searching the keyword view. Please help me on this.
    With Help manual of UFT i tried to navigate and understand if things.

    Reply
  26. Hello.

    I hope that you are doing good.

    How much your training and tutorials are helpful in attempting QTP certification (AIS).

    Thank you.

    Reply
  27. How to write a vbscript program to download 5 files from application1 and upload those 5 files in application2 using QTP/UFT?

    Having below constraints:
    1. All 5 files have the same name.(Ex:”abc”)
    2. Uploading of files in application2 must be in the same order in which the files have downloaded.

    Reply
  28. Thanks for ur share. I was learning to use QTP. I have a problem now. I use QTP11 on Win7, and it can’t load the datatable file named Default.sxl, how can I resolve this issue?

    Reply
  29. Hi,
    I see only UFT available for download in HP site. Will that work for learning(recap) QTP from your site?

    Thanks in advance,

    SV

    Reply
  30. I am having around 5 yrs of experience in manual testing. could you please assist on which automation tool is in corporate level, and can able learn in a short period of time..what is the future scope of the automation tool?

    Reply
  31. Hi,

    I am looking for training in sense talk scripting-Eggplant automation.can you provide a detailed article on that?

    Reply
  32. I am a rooky in this field but will be asking questions when stuck with the processes. I am more than impressed with the forum and a lot can be learnt and shared.

    Reply
  33. Hello,
    This is Vijay, I have followed many of your articles, those helps a lot. Now I would like to know how check font size, background color, font weight of test box in QTP. I am using Firefox browser (56version).

    Reply
  34. Hello,

    This is Rumi. I have bought your QTP course in the past and have been helpful for me. I have a functionality in the current project where I am using a desktop based application and after performing certain actions, I have to press a button which opens the printer window where I have to send the document for a print. I am not able to handle the certain functionality? your guidance will be very much appreciated.

    I am using Micro Focus UFT version – 14.53

    Reply

Leave a Comment