Subscribe by Email


Thursday, September 6, 2012

What is split action and the purpose of using this in QTP?


Well, here is another article that talks about what is meant by split action and what purpose does it has to serve in test automation using quick test professional. 
In quick test professional, after recording of an action it has to be split in to various parts. This is known as split action. 

In quick test professional two types of split actions have been provided as mentioned below:
  1. Splits independent to each other and
  2. Nested splits
- After the recording is complete, it is run and designed the option “keyboard view” is selected and the part to be highlighted is clicked. 
- After this the “split action” option is selected from the step menu for splitting the action. 
- Before you decide to split, you should always remember that once you split the action, it cannot be undone. 
- Your original recorded action will be lost and you won’t be able to recover it. - Therefore, to avoid such kind of situations it is important that the recorded action must be saved the very before splitting it. 
- Saving before splitting is always recommended.
- In some cases multiple split actions that are independent of each other can be obtained. 
- There are several advantages of split action:
  1. With the actions tests can be divided in to business processes and logical units.
  2. With actions quite a modular and efficient scripts can be created.
  3. Multiple actions can be contained within a test script.
- The action that is stored in the test scripts that you recorded can be split either in to parent child nested actions or in to sibling actions. 
- Whenever you split an action the beginning of the other part of the action takes place from the step that was selected during the process of splitting the action. 
- You cannot split an action under following situations:
  1. If you already have an external action in selection.
  2. You have selected the first step of an action.
  3. Some read only test is active.
  4. Running a test
  5. Recording of a test is in progress.
- Some tests make use of a local repository and so while splitting actions contained in such tests following things happen:
  1. A copy of local repository is created by the quick test professional.
  2. The two action splits are assigned the identical local object repositories. Such local repositories consist of all the objects that were present in the original local object repository.
  3. If the objects are added to only one of the split actions, those objects are added to the local object repository of that action only.
- To split an action you need to select the particular step before which according to you lies the starting of the second action. 
- Now, go to the edit menu, the action, and then to split action. 
- Up on clicking on this option you get a split action dialog box. 
- Select the type of actions you want to have i.e., independent or nested. 
- Here, you can also modify the names and description of the two actions in their respective names and description boxes. 
- One important point that you should always take care of is that if you call a reusable action through another test, splitting such an action will cause the test to fail.

Basic purpose of Split Action

- The basic purpose the split action serves is that it makes the application reusable. 
- The reusability is increased since the actions are divided based up on their functionality. 
- Another point is that calling an action is same as asking to execute it and only reusable functions can be called. 


No comments:

Facebook activity