What is an Action? and How many types of Actions are there in QTP?
What is an Action?
Action is nothing but a piece of code/script written Test some part of functionality in the Application under test. Combination of Actions can be called as a test. These actions can be used in other tests if they need.
For Example: Login script is required to test the whole application. In this situation you don’t need to write the login script all the time.Just make it as a action and reuse it where ever you need the login script.
- Action may return multiple values
- Actions will have their own Object Repositories
Types of Actions in QTP?
There are 3 types of actions in QTP. They are
- Reusable Actions: Reusable action can be used in any test by calling it into that test. Tester should create an action as Reusable if he think this can be used in other tests.
- Non-Reusable Actions: By default every action is a Non-Reusable action. i.e. If tester doesn’t specify the type of action explicitly, that action will be a Non-Reusable by default.
- External Actions: A Reusable action associated with an action is called External action. i.e. If an action calls a Reusable action, then that Reusable action is called External action.
In the Integrate phase of the QuickTest Professional workflow, you work with reusable actions that you can call across several tests. You can create a test with multiple actions.
Reusing actions saves time, ensures even distribution of the workload among the team members, and enhances the quality of a test.
Note: Reusable actions enable you to call or copy actions from another test. By default, all actions in a test use a Local Object Repository.
