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 thoughts on “QTP Tutorials – 25+ HP Quick Test Professional (QTP) Training Tutorials”

  1. hello to all can you please let me know what to learn next after manual tester to grow up as test engineer ? i have planed to learn QTP is it a good choice ?? please reply
    thanks

  2. hi..i want to learn QTP tool. Looks like this is the great start to learn it..My background is science degree in electronics. My question is i m new to all of this n plus i don’t have any experience in testing field. Can you tell me its gonna hard for me to learn it or not?

  3. hi..i m begineer. i want to learn QTP. looks like this is a great start.I have done by science degree in electronics. My question is i m not aware of testing tools. n i dont have any knowledge of programming. So, do u think so its gonna be easy for me? Waiting for your reply…

  4. @Komal: First of all, your choice to work on QTP is a good one. However, it needs some work. You will need a working knowledge of VBScripting along with some basics. The good news, its not difficult. So use our tutorials and give it a try. let us know if you face any issues…

  5. hello swati,

    can you please tell me what is a market scope of a test engineer, m worring about it, heard two things

    1. testing’s job are hard to get
    2. less salary
    can you please share your experience with us, for better guidance.
    thanks and regards
    Dhaval

  6. I wanted to download QTP 11 but the HP site would oly provide UTF 11.5. I installed it but can’tsee how to coordinate running the first test sample app – “Flight” login – with the UTF GUI. You advised someone to change the settings in Record and Run, but I don’t see these buttons and the menu options don’t correspond. Any advice?

  7. Hi,

    I like this URL. I am just started learning QTP, so request you to suggest me from where i can start directly scripting in stead of recoring

    Sri

  8. Hi Swathi… I have installed QTP 11.0 trial version and i chose ‘run as administrator ‘ and tried to record but still its not recording. After stopping the record nothing is displaying in the keyword and expert view.

  9. hello all.

    can anyone please tell me which automation tools do not require any coding knowledge. since coading is bool sucker thing.

    thanks

  10. @Vinu: You might want to check the version of the browser you are using. If it is incompatible, its not going to record anything

  11. @dhaval dosi: Well, you ask the most difficult question and it took me a while to get back to you. Here are your answers:
    1. Which automation tools don’t require coding knowledge: I am really not aware of any that don’t require coding knowledge at all. A minimum level of expertise is important.
    2. About testing jobs: It is not hard to get a testing job than it is to get any other IT job. About salary being less, that’s not true. Testers are some of the best paid folks in the industry.

    I hope I answered your questions!

  12. @Sri: Recording a script is not as bad as people make it sound. My suggestion is to initially start learning the automation to record tests(skeletons) and slowly try to add some steps programmatic-ally. Once you feel confident you can switch over to complete programming.

  13. @John B. : The flights app is a sample and it needs to be accessed from the HP QTP menu in the start programs. About QTP menu items not matching, could you please send me a screen shot at swatiseela@gmail.com and I will try to figure out what is happening. Thanks!

  14. @Komal: With the required time,effort and guidance, you will be able to make your way into the testing field. My advice though, is to first learn the concepts of manual testing well before you decide to learn automation. Good Luck!

  15. Hi Swathi… thanks for replying… M using firefox browser version 23.0.1. All the other browsers also latest version only. How will i get to know whether it is compatible or not? Now i have uninstalled the software. Can i install the evaluate copy again?

  16. Hi Swati,
    I have downloaded trial version of QTP 11 .Now its expired;and for practice purpose i want to reinstall again trail version of QT.
    I tried to uninstall the previous trial version from control panel.Also deleted QTP from RegEdit.
    Still no success.It is showing me license expired.Can you please help me in this

  17. hi,
    i am beginner in testing.I am trying to learn automation testing but i dont know detail about automation testing,i got information about automation testing is that there is first create manual test cases and after these test cases need to convert into specific tool using code.what should i do and how ?plz give me suggesion.thanx.

  18. All,
    I need some help on UFT script. I need to open one notepad through QTP then want to update one number from line 3. Each time I run the script the entry number on the notepad need to be increment one. Any one can help this to me?

    Thanks,
    Ramkamal

  19. Dear QTP Testers,

    There is a opening at FIS Bangalore for QTP Testers. Please find the details below

    Open Position: QTP Testing Professional

    Experience: 3-6years

    Location:-Bangalore

    Skill- QTP,Banking Domain(Core Banking or Retail Banking or Any Banking Product or any Banking Application)

    Job Description-

    Person should have 3- 6 years of experience in testing
    At least 3 years+ of automation testing experience using QTP
    At least 2 years of Banking domain experience
    Should have strong testing experience in automation(QTP)
    Involved in preparing test plans, test strategy from the requirement documents
    Good knowledge of automation tools preferably with QTP
    Should be able to provide estimates & should be open to work as an individual contributor
    Should be well versed in working of library functions for automation framework with VB scripts (good at descriptive programming)
    Person should have experience in Banking Domain (Retail Banking / Core Banking / Finacle / Flexcube / T24 / Temenous / Loan / Payments/Bank Fusion/Finone/LoanIQ)
    Good knowledge on developing and analyzing test data and results
    Good knowledge of using issue management tools preferably QC
    To work with a group of automation engineers and manual testers
    Strong communication skills
    Ability to identify and discuss improvements to current processes
    Provide execution/defect status reports

    Must Have:

    Ability to work on automation testing frameworks
    Knowledge and full understanding of the QTP Object Repository
    Custom Library development in QTP
    Ability to write, run, edit and update QC-based manual test cases as required
    Ability to integrate QTP scripts into QC
    Good knowledge of JIRA defect tracking tool
    Person should have knowledge in Framework
    Person should know how to write VB Script(From Scratch)
    Person should have experience in Banking Domain ( Retail
    Banking / Core Banking / T24 / Finacle / Flexcube / Loan / Payments)
    Person should have very good presentation skill

    Kindly share your resume to me at tanushri.mukherjee@fisglobal.com along with the below details

    Total Experience-
    Relevant Experience in QTP Testing-
    Relevant Experience in VB Script –
    Relevant Experience in Banking(Finacle / Flexcube / Temenous / T24 / Retail Bank / Core Bank / Payments / Loan/Bank Fusion)-
    Current CTC-
    Expected CTC-
    Notice Period-(Immediate Joiner/30Days/Under Notice Period)
    Interested for Bangalore(Yes/No)-
    Open for F2f on working Days(Yes/No)-

    **********Immediate Joiners will be given more preference

  20. Hello Vijay!

    Our company is planning to upgrade our QC windows machine from windows 2003 to windows 2008R2.
    Currently we have QC 9.0 version with sql server2000.
    The question i have is if we upgrade to QC 11.0 on 2008 R2 with 2008 sql server, can we able to copy all our projects from current machine to the new one and proceed with the ongoing stage for the project.
    Really appreciate your reply.

    Thanks
    Revathi

  21. Dear Vijay,

    Can I know the best available test automation tool for testing Web based applications which includes end to end testing of both technical/functional test cases
    Top 5 Commercial Test automation application
    Top 5 Open source ( free ) Test automation application.
    Would appreciate to response asap.

    Dilip Bilurkar

  22. Hey Swati

    I have one question, if a person (Manual Tester) doesn’t have any programming background and want to secure his future in automation testing then what will be the best option for him to look forward – QTP or Selenium?

    I didn’t get a chance to read all the above posts, may be someone has already asked this question but would appreciate if you can answer this again for me.

  23. Well, you ask the most difficult question and it took me a while to get back to you. Here are your answers:
    1. Which automation tools don’t require coding knowledge: I am really not aware of any that don’t require coding knowledge at all. A minimum level of expertise is important.
    2. About testing jobs: It is not hard to get a testing job than it is to get any other IT job. About salary being less, that’s not true. Testers are some of the best paid folks in the industry.
    I hope I answered your questions!
    .

  24. Hai, Iam new to this testing environment. i need help in executing the set of lab programs. pls help me .

    1.Study various tools such as Win Runner, Load Runner, Test Director, Rational Rose Suite etc.
    2. Perform various types of testing:
    a. Unit Testing
    b. Regression Testing
    c. Integration Testing
    d. Validation Testing
    e. Acceptance Testing
    f. System Testing
    3. Prepare test plan and develop test case hierarchy
    4. Generate Test cases and Test Documentation in the following case studies
    a. Library System
    b. Course Registration System
    c. Implement a Quiz System
    d. Student Marks Analyzing System
    e. Online Ticket Reservation System
    f. Stock Management System

  25. I am unable to create output values in datasheet for QTP 11.5 trial version

    1)SystemUtil.Run “C:\Program Files\HP\Unified Functional Testing\samples\flight\app\flight4a.exe”,””,”C:\Program Files\HP\Unified Functional Testing\samples\flight\app\”,”open”
    2)Dialog(“Login”).WinEdit(“Agent Name:”).Set DataTable(“AgentName”, dtGlobalSheet)
    3)Dialog(“Login”).WinEdit(“Password:”).Set DataTable(“Password”, dtGlobalSheet)
    4)Dialog(“Login”).WinButton(“OK”).Click
    5)Dialog(“Login”).Dialog(“Flight Reservations”).Static(“Please enter agent name”).Output CheckPoint(“ErrorMessage1”)
    6)Dialog(“Login”).Dialog(“Flight Reservations”).WinButton(“OK”).Click
    7)Dialog(“Login”).WinButton(“Cancel”).Click

  26. I was trying to learn QTP and in the process came across your website. Everything is very well explained and I really appreciate the effort you put into it.

    I have trouble installing QTP software on to my system. I followed the steps provided on the website (downloaded Software_HP_UFT_11.50_English_T6510-15080 from HP website) but every time I try to launch QTP, its asking for a license key. Also tried uninstalling and re-installing the software but that did not help.

    Could you please help me in resolving the issue?

    Thanks,
    Sindura.

  27. I am unable to create output values in datasheet for QTP 11.5 trial version
    Here I am trying to write the output errors into global datasheet for invalid inputs for flight reservation application. I followed steps given in guru99. However my script is executed successfully without any errors but error messages is not getting written into datasheet.
    Can anyone please guide me on this?
    1)SystemUtil.Run “C:\Program Files\HP\Unified Functional Testing\samples\flight\app\flight4a.exe”,””,”C:\Program Files\HP\Unified Functional Testing\samples\flight\app\”,”open”
    2)Dialog(“Login”).WinEdit(“Agent Name:”).Set DataTable(“AgentName”, dtGlobalSheet)
    3)Dialog(“Login”).WinEdit(“Password:”).Set DataTable(“Password”, dtGlobalSheet)
    4)Dialog(“Login”).WinButton(“OK”).Click
    5)Dialog(“Login”).Dialog(“Flight Reservations”).Static(“Please enter agent name”).Output CheckPoint(“ErrorMessage1”)
    6)Dialog(“Login”).Dialog(“Flight Reservations”).WinButton(“OK”).Click
    7)Dialog(“Login”).WinButton(“Cancel”).Click

  28. could you please help me one of my flex project in QTP.. that is so urgent please call me or send email then we can talk about.
    4167258842

  29. Hi,
    Greetings! I have gone through manual testing in STH. That was really great. Now I would like to learn QTP. But I couldn’t download QTP tool in tutorial-1. Could you please let me know how could I download.
    Looking forward to hear form you soon.
    Thank you.

    Regards,
    Lakshmi.

  30. Hi,
    Great and spoon feeding tutorial. I have gone through manual testing. I cannot download QTP as said in tutorial 1. Could anyone here help me please.

  31. Hi Vijay/Swati
    I am planning to enter in software testing field. I have gone over your website information and tried to download the HP QTP Essentials 11.0. from HP site. I could not find the Trials and Demo tab there. The HP Unified Functional Testing 11.50CC SW E-media is available. I tried to download this but HP needs to know the reason like evaluation, monitoring, networking, recommend to others to download it. I do not know what should I select as I want to use this for learning and This is not there.
    Can you please guide me? Am I at the right page of HP ? If yes then what should I select? Is it free download?
    Thanks

Leave a Comment