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 to bring this series for our readers.

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

QTP Tutorials

NOTE: Below text tutorials are enough for you to get started learning on the QTP Automation tool. But if you are interested in hands-on QTP training 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 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.

The IDE has various features that aid the tester to develop 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. (A scripting language is one that gets interpreted at runtime)
  • QTP runs only in a Windows environment.
  • The current version of QTP is 11.0 (Latest version Unified Functional Testing – UFT 11.5)
  • The technologies it supports are Web, Java.Net, SAP, Oracle, Siebel, PeopleSoft, Web Services, and many major languages. Although 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, 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 to 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 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 – 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 want to tweak the source code as per their requirements.

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

Let’s record a little something to get started

Step #1): Launch QTP. The first thing that comes up is an 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 start page comes up. (click on image to enlarge)

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’ in 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. 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. (click on image to enlarge)

QTP keyword view

The corresponding keyword view of 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. A test can be recorded on a Web or Windows application; the 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. @khristineskollections: Initially you will be able to use QTP as a trial. So in the start up page, click Continue instead of install license button.

    Reply
  2. Is QTP helpful for the conversion application like for e.g. Spreadsheet converter plugin for excel, where we have to test the exact conversion of data, charts from a spreadsheet to webpage, flash or smartphone. If not QTP which tool would be helpful for such

    Reply
  3. @Ujwala: What would you need to test in your case? The conversion itself or the way the converted data appears on the webpage…Please provide more information, so we can help you decide if QTP is a feasible tool for you….

    Reply
  4. @Bhavin: Right next to the install license option there is a ‘Continue’ button that you can use to try QTP…Did that not work either?

    Reply
  5. Pls i tried to download the trial version of QTP for pratice.
    But when i click the linl https://webware.hp.com/welcome.asp , i couldnt find link ” Generate New Licences” as a result i couldnt follow all the series .
    Pls am very keen follower of this blog, i will appreciate if anyone canput me through . thanks a million

    Reply
  6. Hi Swathi,
    It is a nice article,Please let me know in what framework QTP runs,What are the steps in QTP,What are files will get saved and why? And in step3: It is shown as web tab on record and play back ,but when i choose window applications tab and by choosing “Record and run test on any open windows-based application” this option only in qtp flight application got recorded as it is a window application

    Reply
  7. @ritu ,@suprabha this may be the problem try this too
    In step3: It is shown as web tab on record and play back ,but when i choose window applications tab and by choosing “Record and run test on any open windows-based application” this option only in qtp flight application got recorded as it is a window application

    @sonali: u no need to format ur system u can uninstall QTP then clear the registry entry for QTP then restart your system then install the QTP again

    Reply
  8. I downloaded latest version HP Unified Functional Testing 11.50 CC English SW E-Media Evaluation. The screen on the top it says Quick Test Professional (Test*) , But mine shows Unified Functional Testing, How to get the screen which is on step 4 Flight Application . Please Waiting for ur reply

    Thanks

    Reply
  9. This is a nice article for the beginner to start learning QTP. Thanks for starting the initiative. Hopefully I will learn QTP by following these articles..

    Reply
  10. The application that i’m testing is add-in excel, where I do the testing for conversion like data, charts in case of all browsers, and all version of Excel. The data entered in excel is converted into html, smartphone, flash format so I check the accuracy and proper conversion in various samples.
    Please suggest if QTP is helpful for it.

    Reply
  11. @Ujwala: I would suggest you to download the trial QTP and give your app a try. If you are facing issues, let us know the exact issue. That way you will be able to assess the feasibility of QTP hands on instead of going on a theoretical approach….

    Reply
  12. I Want to know how different is the versions 10.0 and 11.5 . Currently the new version is 11.5. Is the tool changes drastically or updations. Could you please let me know.

    Reply
  13. I Want to know how different is the versions 10.0 and 11.5 . Currently the new version is 11.5. Is the tool changes drastically or updations.

    Reply
  14. Hi Swathi

    This is very helpful information for beginners as am a manual tester and trying to learn QTP your step by step explanation is very appreciated.

    Thankyou verymuch.

    Reply
  15. Hi Swathi,when I downloaded QTP in my system i mistakenly choosed concurrent license is there any way to change it to seat license.

    Thanks
    Archana

    Reply
  16. @Lakshmi: There are minute differences, for example in 11 micClass values are not case sensitive but in 10 they are. So if you are trying to learn then the older version is fine too.

    Reply
  17. @Archana: I am not sure I understand it clearly. You downloaded a trial version and entered the license key incorrectly while start up? If thats the case, try to reload QTP and try if it works. Personally I have never tried but my guess is it will work. Let me know how it goes.

    Reply
    • I am having around 4 yrs of experience in manual testing. could you please assist on whcih automation tool is easy and can able to execute in a short period of time..what is the future scope of the automation tool? kindly advise on this.

      Reply
  18. Thanks for your Excellent initialization to start QTP from the basics.One kind suggestion is that,a training would be even more helpful if you can explain the upcomings information with simple examples and screenshots, so that it would help the concepts clearly.

    Reply
  19. Wow!! This seems to be a perfect place to start wity QTP.
    Thank You Swati… You make it very easy to learn and interesting too.

    Reply
  20. Hi this really helps the beginners to start up with QTP..Swati U really made all the points clear and easy with the pictures too….Thanks and I want to make sure where we have to give the login details in the example u mentioned….(Is it in the welcome screen of QTp page??)

    Reply
  21. @Sai: The login ID and Password I was referring to are to be entered in any web based email page, example, gmail.com.

    Reply
  22. Thanks Swati for this informative intro to QTP.
    I entered the username password after launching flight however no code is generated. what am I missing here?

    Reply
  23. Hi the series was very good, informative and really helpful.

    I wish you could start a tutorial for automation frameworks comprising of what is a framework, what are the uses of using framework, different types of frameworks, different parameters to come up with a proper framework etc.

    Hope to see some tutorials for the community.

    Reply
  24. Dear Swati

    Really appreciate your effort, its really useful for me.
    Just a small info, in Step#4-para-3, it is mentioned as THE CORRESPONDING KEYWORD VIEW , whereas it is suppose to be THE CORRESPONDING EXPERT VIEW

    Reply
  25. Hi swati

    After downloading the trail version, when I try to open the qtp, it says the demo license expired whereas I have downloaded qtp version 11 for the first time now. Can you please help me on that.

    Reply
  26. Appreciate your work Swati. It reminds me of QTP again, long back I have learned it now because of no practice I lost touch in QTP. Now I will try to learn and recall my memories with QTP.
    Can you please help on VB script?

    Reply
  27. @ananya: thank you for pointing out.

    about the license, can you stop and restart QTP and choose, trial during start up. If it is the first time, you should not be seeing that. If it does not help, please email us a copy of the message you are seeing. We will try to debug it.

    Reply
  28. @sayed: sure. i will be happy to help you with VB script. There are 2 articles for basic VB script concepts.

    Reply
  29. hi Vijay I am unable to load web objects in object repository

    I am using windows 7 and IE 10 version qtp 9.2

    please help me to find the solution

    thanks and regards,

    Reply
  30. I was working with the Actions, all of sudden today i came to know that all my actions in one of the script are missing (showing the icon as missing actions).. can any one suggest how to get those actions back.. as these are the reusable actions we have used in many scripts

    Reply
  31. Hi Swati,

    I am very glad to inform you that I was searching for a suitable on line tutor for QTP. Now I have got it, that is you Swati. Very good article, very much helping.

    Reply
  32. i also think this is the greatest thing since sliced bread. can someone help me out with the downloading of the HP QTP -E 11.00 EVAL PACK Eng SWE-MEDIA i recieved my delivery confirmation number. i downloaded it and had several icons but nothing to let me launch QTP in order to be able work with while on this project.

    Reply
  33. I lauched QTP and also the flight application. But i could not see anything in Keyword view or Expert view screen in the launched QTP. I want to know if i have missed something? or if i have done something wrong?

    Reply
  34. Hi Uthra Umesh,

    you need to change the settings in Record and Run settings in order to view the Keyword view or Expert view screen. click on the Record button > ‘windows applications’ tab on Record and Run settings window > select the radio button ‘Record and Run test on any open window based application’ > click ok

    Reply
  35. Swati, Appriciate you for your initiation. You artical is perfect for beginner and for those who want to brush up the QTP knowledge. Thanks!!!

    Reply
  36. Swati,

    I stumble upon your article and found it so very helpful! It is easy to understand. You are such a nice person to put all this together for all to share. We all appreciate it a lot! Cheers!!

    Reply
  37. @dhaval – you need to learn vbscript.. its quite easy to learn, so dont worry. QTP as a tool is also quite easy once you get the hang of it.

    Reply

Leave a Comment