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

Is AI taking over your job in software development and testing? 😱"

Are you a software developer or tester feeling threatened by the rise of AI in your industry? 😰 You're not alone. Many professionals in the field are concerned about the potential consequences of AI's integration into software development and testing. While some experts believe that AI can bring significant benefits to the industry, others worry that it could replace human expertise altogether. 🤔 AI algorithms can analyze massive amounts of data and automate many tasks, but they cannot replace the critical thinking and creativity of human beings. Additionally, there are ethical concerns associated with the use of AI in software development and testing. So, what can you do to ensure that you're not replaced by AI in your job? 💪 First, it's essential to recognize that AI is not a replacement for human expertise but rather a tool to augment it. Therefore, it's essential to learn how to work with AI-powered systems to increase your efficiency and productivity. Additi

Revolutionize software testing with AI! 🤖💻 Share your thoughts on ethical implications in the comments.

  As technology evolves, so too does the field of software testing. One exciting development in recent years is the use of AI (Artificial Intelligence) to automate repetitive tasks and improve testing accuracy. Through analyzing large amounts of data and identifying patterns, AI can help identify potential defects or vulnerabilities in software. AI-powered tools can also generate test cases and scenarios by simulating user behavior and input, allowing for more efficient and effective testing. In addition, machine learning algorithms can analyze and learn from past testing data, leading to better predictions and more streamlined testing. AI-powered tools can also help identify and prioritize critical bugs and defects, saving valuable time and effort in manual testing. But it's important to note that AI-powered testing is not a replacement for human testers. While AI can automate certain tasks and help identify potential issues, it's still necessary for human testers to provide a

HP Quality Center - Best Practices

1.Introduction Quality Center is a test management tool which provides very good features for managing both your manual and automated test cases. This paper highlights the best practices for managing your test cases. When you open Quality center, depending on your rights it display the below mentioned option in the sidebar: 1. Requirements 2. Test Plan 3. Test Lab 4. Defects 5. Dashboard 2.Requirements When you have assigned with the responsibility of developing your test cases in the quality center then you must be wondering where to start with. I am going to share my experience to overcome such a situation. You need to find the solution of some question before you start writing your test cases. 1. Is your requirement developed and available? 2. Is your requirement organized in a logical sequence? If answer to both of the above question is Yes, then you can start with Requirement option in the side bar. In case your requirement is under development, then you keep your