Skip to main content

HP Quick Test Professional Tutorial Chapter 2

1 FILE Menu

In the first series of this article you have seen the usage of various commands available in File Menu option. This paper is in continuation of my previous series and in this series we will mainly the File->Settings option. I have not included Setting explanation in the first series because understanding Setting is very important for real time usage. You will visit this option very frequently and you must understand its usage in a better way.

1.1 Setting

To open the Settings Dialog, Click File->Settings (as shown below).
clip_image002
We will see each useful option available in the above dialog which helps you a lot while you are developing your test script. I am going to explain about each option such as Properties, Run, Resources, Parameters, Environment, Web, Recovery, Local System Monitor (new in 10.0).

1.1.1 Properties

In the Properties, many of the static things are self explanatory. You can use Properties for:
· Adding or removing the associated add-ins for current test. If you are working on a web based application, it’s always a good practice to de-associate other add-ins to save on memory performance and avoid conflict while opening the Test. Associating or de-associating will require QTP to be started and then you can see your changes.
· You can use Properties Window to Generate the Script of your settings and save as .VBS file. The advantage of having this script is that it can be distributed to all the team members so that settings for all the Test Script remain same. A sample script is shown below:
clip_image004
When above script will run on the Team Members QTP installed machine, this will ensure same configuration of QTP for developing or running the script. This is a real life example of Generate Script usage which I have shown above. There may be other settings as well depending on organization or project needs.

1.1.2 Run

clip_image006
Run option can be used for:
  1. Control your iteration if you are driving your test through excel – Use Data Table Iterations section to control your test execution:
    1. Run one iteration only will run the script only one time. This normally picks the data from Global Sheet.
    2. Run on all rows- Your test run as many times as there are number of rows in the Global Sheet. In real time I hardly use this as this will be an overhead and make your maintenance really costly.
    3. Run from row - here you can customize your test run by providing the From Row number and To Row number. If you want to run from say row 2 to row 20, then provide your value as 2 and 20. I hardly use this option.
  2. Set the action that will be taken when script is running and encounter any error. The QTP will respond to that error in the defined way. So, if you want to suppress all the error, then you can choose “proceed to next step”. This way your script will not stop executing. But there are other impacts as well if you set this as an option. So, depending on your requirement you choose this option with care. This is a global setting option. As a best practicepop up message box” is the best action for any script error or object error.
  3. Object Synchronization Timeout – This is very self explanatory. What time QTP waits for any object before it display you any error. You can define the timeout based on your requirement. Again this is a global setting.
  4. Disable Smart Identification during the run session – I am not diving in much depth (may be in next set of series I will deep dive) what Smart Identification means but as a best practice tick “Disable Smart Identification during the run session”. This will make your script robust when it runs.
  5. Save image of desktop when error occurs (if test is run by the HP Business Process Monitor) – New Option available in QTP 10.0 – I have not used this option. You can check the QTP help to know more about this option. But as per my experience we hardly make use of this since usage of this again is an overhead on the resources that will be saved with the test.

1.1.3 Resources

clip_image008
This is one of the important options in Settings Window. This will be very frequently used as you need to associate the relevant library and architecture file using this window. Once associated you can make full use of those library files while developing your script. This is something like include statement which you normally write in your C++ programming.
I have never used the Datatable option available in this window since my architecture load the required data file on the fly and so I never use this option. But if you want to set the other location for your Data file, then you can select Other Location option to do that. This Excel will be used during your Script development and execution.
How you will associate the Library file in your Test – Click the clip_image010 sign and you will see a line item in the grid, navigate to the location and select the library files that you want to associate with your test.
In real time, you should always associate pre-defined library files with your test. This option will be very frequently used by scripter in real time.

1.1.4 Parameters

clip_image012
The parameter tab will also get used when you want to call your test with parameters. This is same as function arguments. The usage of the Input and Output parameter depend totally on your application requirement and framework development around your application. I can give you an example where I have used the Input Parameter in one of my complex project. I want to develop a mechanism wherein the Execution Team should have the flexibility to control the execution of test iteration. For e.g. If s/he want to run the test say from Row 20 to Row 30, then they can easily do it. They just have to provide the row number in QC from where they are running the Test.
These parameter are for Test and Not for Action. Remember there is substantial difference between the Test Parameter and Action Parameter usage. Output Parameter is again on global level wherin you can store the output in Quality Center. The usage entirely depends on the complexity and requirement of my solution.
To define these parameter, cick the clip_image010[1] sign and enter the parameter name, datatype, default value if any and description. After you define these parameter, you can see the parameter in QC Test Run Tab wherein you can provide value to Input Parameter and check the value of the output parameter.
The real time usage of these parameter is very complex and if you do not have good command, I suggest then do not experiment on real project in QC and instead practice first on demo qc.

1.1.5 Environment

clip_image014
There are 2 types of Environment variable:
· Built In – see the available environment variable. These built in variable are very handy while doing scripting, so please go through each of these built in variables. You can use these variable by writing Environment. Value ("ActionName"). You can change the Value parameter to either user defined variable or built in variable. The statement will return you the value available in the variable. This is very handy while designing the architecture around automation.
· User Defined – Any variable that is defined by user. As a best practice, define only global type variable for environment. You can export the variable as an XML file and then re-load with your test for usage. If you are not familiar with XML, then you can use this Tab to create all the user defined variable at one go. After creating all the variable, export to XML and then start making use of it across your Team.
I am not going to cover how to create user defined variable in this paper and will cover in next set of series for intermediate or advance.

1.1.6 Web

I have not used this option in my real time. But for your information, you can make use of Web Tab for doing settings regarding timeout and storing user name and password for the web pages which require authentication on each run.

1.1.7 Recovery

clip_image016
From this window, you can associate the relevant recovery file which will be called in case of any error. Select your recovery file and associate and you are done. If you have generic recovery file and you want to make use of that generic file for all your test, then do the association like this.

1.1.8 Local System Monitor (New in 10.0)

I have not used this option much, but if you want to monitor the application or program which your test will run or is running, you can do so by this Tab. The Tab gives you an option to monitor the performance of the local system. You can monitor Memory Usage, GDI Objects, Handle Count, Thread Count, %Processor Time, %User Time etc.
This completes the File Menu usage series. In next series, we will see the usage of Edit Menu. Keep checking my blog.

2 References

Quick Test Professional Tool

3 Additional information

You can email me on Sachin.vasudha@gmail.com with any query.

Comments

Popular posts from this blog

Mantis - Defect Management Tool - User Guide

Introduction This white paper contains information related to an open source defect management tool called Mantis which is freely available for managing all your defects. Where to Download One can download the latest version of Mantis from http://sourceforge.net/project/showfiles.php?group_id=14963 Download the “mantis-stable” and then “mantis-x.y.z.zip”.1.1 PRE-REQUISITE Operating System Windows 2003 Server, MacOS, OS/2, Linux, Solaris Database MySQL database 3.23.2 and higher Software PHP 4.0.6 and higher Application Server Apache 1.3, Apache 2.0.54, IIS 6.0 with Web Services Extension Browser IE6 and above, Mozilla Firefox STEPS FOR INSTALLATION – FOR WINDOWS MySQL Installation Install MySQL by downloading it from http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-gui-tools-5.0-r6-win32.msi/from/http:/www.mirrorservice.org/sites/ftp.mysql.com/ . Please follow the below mentioned steps while installing MySQL: (Please remember the password for “root” account...

Why to do Software Testing?

Regardless of the limitations, testing is an integral part in software development. It is broadly deployed in every phase in the software development cycle. Typically, more than 50% percent of the development time is spent in testing. Testing is usually performed for the following purposes: To improve quality. As computers and software are used in critical applications, the outcome of a bug can be severe. Bugs can cause huge losses. Bugs in critical systems have caused airplane crashes, allowed space shuttle missions to go awry, halted trading on the stock market, and worse. Bugs can kill. Bugs can cause disasters. The so-called year 2000 (Y2K) bug has given birth to a cottage industry of consultants and programming tools dedicated to making sure the modern world doesn't come to a screeching halt on the first day of the next century. [Bugs] In a computerized embedded world, the quality and reliability of software is a matter of life and death. Quality means the conformance to the ...

Is BCI (Brain Computer Interface) a road to immortality?

What is a Brain-Computer Interface? Brain-computer interface is a technology which can read your mind and display it on a device - a mobile, laptop or TV screen. It means what data is being carried by our billion neurons are prone to hack.  When combined with other mechanical devices, can also be used to control the device.  So in future, if you want to switch on your TV or light, you just have to think and that's all.  Google and Alexa home will be replaced by BMI controlled devices.  I am not an expert in this field but based on my research and analysis, I can predict that when BMI tech will get matured, the human can do brain to brain talk and many other magical things - in future Telepathy will be a day to day affair. BCI can give you all kind of experience from the comfort of your home.  You can go on vacation without leaving your bedroom. You can have romantic experience without having a partner and many more such experiences. ...