Site icon Tutorial

Automation Testing Tutorial | Working with Action

There are three options to insert a QTP action. Click on each one of those to know more about the selected type of action.

Action Type Description
Insert Call to New Action Inserts a New Action from the existing action
Insert Call to Copy of Action Inserts a copy of an existing action
Insert Call to Existing Action Inserts a call to existing re-usable action

Creating an Action

Each QuickTest test comprises calls to actions. QTP Actions are units that divide your test into logical sections. When you create a new test, it contains a call to one action. By dividing your tests into calls to multiple actions, you can design more modular and efficient tests.

QuickTest lets you insert several types of actions into tests. An internal action is an action that is stored in the local test (also known as a source test). An external qtp action is a referenced call to an action that is stored in a different test. For example, you may have an action that you want to use in multiple tests—you would store the action as an internal action in one test and insert calls to that action from other tests. In the other tests the action would be available as an external action.

When you insert a call to a new action, it is reusable by default, enabling you to insert calls to the qtp action from any test. Reusable actions are especially useful when you have a process that you may need to include in several tests, such as logging in to your application, or that you may need to insert several times in the same test, such as filling in user credential dialog boxes that open whenever a user tries to access a secure part of your application. Reusable actions can be internal or external actions.

If you want to prevent a qtp action from being reused in any test, you can make it non-reusable. Non-reusable actions are internal actions that can be used only once.

In this section, you will create a new test and rename an action so that anyone viewing this test will know the purpose of the action.

Start QuickTest.

Create a new test in one of the following ways:

Rename Action1 so that it has a logical name.

Create a new qtp action named FlightFinder.

Create calls to additional actions.

Repeat step 4 to add the following actions:

Your test now contains all of the actions needed to begin this tutorial.

Save your test

If a test has changed and is not yet saved, the test name in the title bar contains an asterisk.

Test Your Automation Testing Skills By Taking Our Free Practice Tests On This Link

Exit mobile version