Skip to main content

HP QTP Tutorial - Chapter 9

1 Resources

In my previous chapter, I discussed about the features available in Automation Menu including Run and Record Settings. This chapter covers the features available under Resource Menu option. This chapter explains the following features available under Resource Menu:
clip_image002

Some of the features under Resources are very frequently used when you need to do the scripting and manage your Shared or Local Object Repository. You can manage your Object Repository; Associate your OR, Add Recovery Scenario etc. We will cover most of these features in detail in this chapter.

1.1 Object Repository

When you are doing your scripting and want to view the Object Repository which is attached with the current Test Script, you can access it using Ctrl+R or by navigating to Resources->Object Repository.: You will see a below screen which is having multiple commands for modifying and adding new test object in your local or shared object repository. This is one of the screens which is very frequently used during scripting and you must be aware about the usage of this functionality.
clip_image004
As you can see that on the left hand side you have the detail of the entire test object in a tree like structure and on the right the object properties details where you can add or modify the detail of existing or new objects. We will cover Object Repository and Object Repository Manager in a separate Chapter as there are various useful features which cannot be explained in this Chapter.

1.2 Object Repository Manager

Object Repository Manager is the place where you can Open an existing OR and you can add or modify the OR properties. This again is a very frequently used feature of QTP.
clip_image006

There are features which are common to OR Manager and Object Repository screen. To access Object Repository Manager, navigate to Resources->Object Repository Manager.
As a best practice while modifying the Object Repository, please ensure that you are opening the OR for modification when no one is modifying it at the same time. One of the mistake which people do is they will not open the latest version of OR and they might have opened an old version and modify it and then save it. If you will do like this, the changes done by other will be lost. So never modify your OR which was open earlier and then you press the edit button. Always make a practice to Open and then edit and not opened and edit.


1.3 Associate Repositories

This feature is also very frequently used and when you need to associate a shared OR with your current Test, you need to do it by Associate Repositories. You can access this feature by navigating to Resources->Associate Repositories.
clip_image008 clip_image010
clip_image012
To associate an OR you can click on + icon and navigate to OR location and then click OK. The selected OR will be visible in the Repositories Section. You can repeat the same process to associate multiple ORs. Once you selected the OR, then click on > button so that available actions will move to Associated Actions. Once you performed these actions, then click on OK. This will complete the process of associating OR to your Test.

1.4 Map Repository Parameters

Map Repository Parameters feature can be used when you want to parameterize the property values of an object. You can access this feature from Resources->Map Repository Parameters. Let’s take an example to better understand the concept of Repository parameters. Suppose I have an object say Edit Box and the property of this edit box changes dynamically following some pattern such as txt001, txt002 etc. In such a case you can parameterize this property value. In real time, test scripter hardly used this feature of QTP as they manage such changes using Regular expression.
Before mapping the parameter, you must define the parameter for the Object Repository. You can do this from Object Repository Manager. Open OR Manager and then navigate to Tools->Manage Repository Parameters. See below screen shot
clip_image014

Click on + icon to define new parameter. The screen is self explanatory. Once this is done then you can view all the Repository parameter from Manage Repository Parameters feature of Resources Tab. See below screen:
clip_image016
Note: This feature of QTP is not used in real time but you should know why this feature exists in QTP.


1.5 Recovery Scenario Manager

Recovery Scenario Manager is the feature which decides the action which will be taken by QTP when it encountered any expected or unexpected error. You must define a Recovery Scenario for your Automation Framework and will ensure that each of the Tests is calling the Recovery Scenario to handle error conditions. This is error handling mechanism for QTP Script.
You can access Recovery Scenario Manager from Resources->Recovery Scenario Manager. Refer below screen shot for Recovery Scenario Manager. I will dedicate a separate chapter on this functionality.
clip_image018
As a best practice, define Recovery Scenario for Global Error Condition which is Exceptional in nature such as QTP Tool Error, System Error etc. Do not replace Script error handling with the use of Recovery Scenario. I will not recommend the use of Recovery Scenario for Object State, Pop-up Window or Test Run error. But you can use it for Application Crash Conditions which is exceptional in nature.

1.6 Associated Function Libraries

Sometime when you are doing scripting in a big team and there are functional libraries, OR which need to be included in the test script and you want to check whether Function is associated with Test or not, you can use Associate Functional Libraries feature to see what function library is associated with your Test.
clip_image020

2 References

Quick Test Professional Tool.

3 Additional information

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

4 What Next?

In my next Chapter I will explain the features of Object Repository Manager.

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