Browse By

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 andTo 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 practice “pop 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

4 thoughts on “HP Quick Test Professional Tutorial Chapter 2”

  1. TechnologytoKeepYouontheTrain says:

    Hi there, just became aware of your blog through Google, and found that it’s really informative. Technology to Keep You on the Train http://www.zhaohaobao.com/bbs/viewthread.php?tid=248978&extra=page%3D1&frombbs=1

    1. admin says:

      We are into the Software testing, and we our major services are inclined towards Website Testing, Mobile App and website Testing, Performance, Security etc.
      For more information and to know us better you can visit http://www.kroogerr.com, or email us at sales@kroogerr.com.

      You can also register on our website or Blog, to share your experience or also you can write for us and Testing world.

  2. QTP training in chennai says:

    Hi, i too landed on your website while browsing for QTP automation testing tool. Your blog is very informative and loaded with complete tutorials for QTP. Your blog is dedicated for students and testing professionals searching online QTP tutorials. Thanks for sharing.

    1. Drew says:

      Thanks for recognizing our efforts. We are trying yo put most of the content together so that students, testers can get benefits out of this.

      ~Cheers
      Kroogerr Team

Leave a Reply