Subscribe by Email

Friday, September 14, 2012

What is a step generator in QTP?

Step generator as we all know is quite a useful as well as popular feature of the complete test automation suite “quick test professional”. 

What is a Step Generator?

- It generates a library of the functions which also forms a part of the quick test professional suite.
- The step generator serves the purpose of the non recordable as well as record able steps.
- To get to the step generator in quick test professional, just go to the insert menu, then hog down to the step generator option and here you have it. 
- Or, if you do not want to go for this method you can straightaway press the function key F7 which is the short cut key for this whole procedure.
- A range of context sensitive functions are provided by the step generator. 
With the help of these context sensitive functions it becomes very easy for one to add the steps as required. 
- The steps in the step generated can be added with the required values. 
- The steps mentioned below can be defined in the step generator via the step generator dialog box:
  1. Utility object operations
  2. Tests only steps or test object operations
  3. Call to library functions in tests only
  4. Internal script functions
  5. Visual basic script functions and so on.
Some examples of such steps are:
  1. Adding a step that checks regarding the existence of a particular object i.e., whether it exists or not.
  2. Adding a step in which the output or the returned value of a sub routine or method or the result of a conditional statement is stored.
- Any of the values present in the step can be parameterized. 
- Another purpose that is served by the step generator is that using it one can insert steps in tests as well as in functions also. 
- But it has got a limited use when it comes to the library functions. 
- Step generator cannot be used to get access to collections or test object names or a list of the library functions either. 
- Before the step generator is opened up for defining a new step, the place or the point where that particular step is to be inserted is selected and then the step is defined.

What happens when you open the step generator dialog box?

- When you open up the step generator dialog box, the first thing that you need to do is to select the category of the step operation out of the categories mentioned above.
- Then, you should select the function library or the object that is required. 
- The step after this involves the selection of the appropriate operation like either method or property or function. 
- The final step involves the defining of the return values as well as the arguments or the parameters as and when required. 
- After the completion of all these steps, the step is inserted by the generator in to the required test with the corrected syntax. 
- Later, one can add many more steps at the same location itself without shutting down the step generator. 
- Later whenever needed the step generator can be accessed from either of the following:
  1. Expert view or
  2. Key board view or
  3. Active screen.

For what purpose step generator is used?

- Step generator is mostly used for breaking down the tests to obtain better testing results. 
- It will not be wrong to consider this as a debugging process i.e., debugging by giving breaks. 
- Since particular steps can be generated in between the actions, a lot of time is saved. 
- Also, if while recording the tester misses out one step it can be easily inserted afterwards using step generator. 

No comments:

Facebook activity