HP Quick Test Professional Tutorial Chapter 1
In this article I will explain how you can make use of File Menu option available in HP QTP. This is a very basic usage and I thought to start the Basic Series so that newbie’s can learn QTP by following the complete series on this Blog. I will publish the Series subsequently. Next Series I will explain only about the File->Settings option which is very useful in real time usage.
1 FILE Menu
1.1 New Menu
If you want to either create a new test, business component, or function library you have access the File->New-><<Sub Option>>>. Figure is shown below:
1.1.1 New Test
New Test option is used to create a New Test Script. You can create a New Test by pressing Ctr+N, or click File->New->New Test. Once you do above operation, you will see a blank Test Script Page where you can record or write your VB Script code.
1.1.2 Business Component
Business component is mainly used when you are planning to use Business Component Testing model and you have a Quality Center connection with valid BPT License. This is a separate topic for discussion. Keep checking my blog for updates on BPT as well.
You can create a business component by pressing Ctr+Shift+N, or click File->New->Business Component.
1.1.3 Function Library
Functional Library as it name suggest is the placeholder wherein you can define all your reusable functions which will be used in your Automation Framework. It will consist of all the Function or Sub for your Application, Loading of required OR, loading of required folder path and architecture.
To create a Function Library, press Shift+Alt+N, or click File->New->Function Library.
1.2 Open Menu
To perform your daily operation on the Test Script, Functional Library, Business Component you need to access the option available under this Menu.
Note: We will not cover Application Area.
To make any modification in your script at later point of time, you need to open the test script. You can open your QTP Test by pressing Ctr+O, or click File->Open->Test.
Navigate to the location where you have saved your QTP Test and select the Test to open in Edit Mode. In case you want to Open the Test in Read Only Mode, you need to select the “Open in read-only mode” checkbox on Open Dialog box.
Note: If you are connected to Quality Center, you need to navigate to respective QC Test Plan Folder to Open your Test. If any other user has already opened that Test, then you cannot open the Test in Edit Mode and Test will be loaded as Ready Only mode.
1.2.2 Business Component
This option is available when you are connected to Quality Center having a valid BPT License. You can open and edit your Business Component Asset by pressing Ctr+Shift+O, or click File->Open->Business/Scripted Component.
1.2.3 Function Library
To make any modification in your Function Library at later point of time, you need to open the Function Library. You can open your Function Library by pressing Shift+Alt+O, or click File->Open->Function Library.
Navigate to the location where you have saved your Function Library and select the library file to open in Edit Mode. In case you want to Open the Library in Read Only Mode, you need to select the “Open in read-only mode” checkbox on Open Dialog box.
Note: If you are connected to Quality Center and you have saved your Library in QC, you need to navigate to respective QC Test Plan Folder to open your Library File. If any other user has already opened that Library file, then you cannot open the Library File in Edit Mode and it will be loaded as Ready Only mode.
1.3 Close all Function Libraries
In case you have opened multiple Function Library, then you can close all the Function Libraries file by clicking File->Close All Function Libraries.
1.4 Quality Center Connection
In real time scenario, we save all our test cases in QC (in case Organization has valid QC Licenses). To Save or Open any Test from Quality Center, you first need to connect to Quality Center. Click File->Quality Center Connection. Enter the QC Server URL and post that enter your login credentials to get connected to QC. Sometime you might need to select the Domain & Project Domain as well.
One can choose Reconnect to server on startup to automatically get connected with QC, whenever QTP is opened.
Choose Authenticate on startup in case you do not want to enter your login credentials every time.
You can choose Login to project on startup option when you always want to login to same domain and project to carry out with your work.
These Domain and Project are normally defined in QC Administration and User Group.
1.5 Save & Save As
To Save the current test you can either press Ctr+S, or you can click File->Save. This work in a same fashion as any word processor tool, Save feature works.
If you are working with Test, then pressing Ctr+S, will save the Test with latest changes made.
It’s not a good practice to save the Test with Active Screen files. In case you want to Save the same Test with different name, then use Save As option.
The above is true in case of Function Library as well, the only difference is that you can save the Function Library as VBS, TXT and QFL.
See the below structure to understand how a Test is saved on the drive.
Do not make any changes in the file available beneath your Test Folder.
1.6 Export Test to Zip File
You can Export your Test to Zip file to save disk space and for making usage across the network. Your Test should be open, before you start your export to Zip file. You have to individually export each Test File.
In real time scenario we rarely use this feature as all the Test Script are maintained in QC but where the Test Script get maintained in Shared Drive, there you may use this option to save the Shared Drive Disk Space and it also act as a backup of your Test Script.
To initiate, click File-> Export Test to Zip File. Please ensure that Test is open while using this feature.
1.7 Import Test from Zip File
To import the file, click File->Import Test from Zip File.
Select the Zip File location and destination where you want to unzip the file.
Quick Test Professional Tool