QTP Tutorials – 25+ HP Quick Test Professional (QTP) Training Tutorials

Today we are publishing part one of a multi-part guest post series on HP 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.

NOTE: Below text tutorials are enough for you to get started learning on QTP automation tool. But if you are interested in hands-on LIVE QTP training please check our comprehensive QTP online course by the experienced professionals. Click on below image to view more details about this course.

Also Check Our Online QTP Training Course Here:

QTP training 1

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 QTP trial version and ask your questions in 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?

HP’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 which 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:

  1. It uses VB Script as its scripting language. (A scripting language is one that gets interpreted at runtime)
  2. QTP runs only in a windows environment.
  3. The current version of QTP is 11.0 (Latest version Unified Functional Testing – UFT 11.5)
  4. 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 corresponds 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.

E.g.: 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 little bit 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 record 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 QTP.

In the above link, go to the ‘Trials and Demos’ tab and select the ‘HP QTP Essentials 11.0 English Evaluation (web GUI Testing only) option’. You can also select the latest version HP 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:

  1. 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 item, operation, value and documentation.
  2. 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 “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, a 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 to 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 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. Keyword view is a tabular form that shows details like the name of the objects, its value, and the operation performed etc. 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 Training Course:

QTP training 2

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.

187 Comments on “QTP Tutorials – 25+ HP 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……….

  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

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

  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

  5. fresher at qtp

  6. help me what to do before i start qtp learning

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

  8. 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.

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

  10. What is latest in QTP?

  11. Good tutorials on QTP

  12. 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

  13. 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.

  14. 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.

  15. Hi,
    do i need to learn VB before QTP.

  16. What is the difference between functional and regression testing?

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

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

  19. 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

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

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

  22. 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

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

  24. 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

  25. 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.

  26. 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.

  27. What are containerobjects in QTP?

  28. 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.

  29. Hello.

    I hope that you are doing good.

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

    Thank you.

  30. 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.

  31. 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?

  32. 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

  33. 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?

  34. Hi,

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

  35. 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.

  36. Test comment

Leave a Comment