Subscribe by Email


Showing posts with label Context Sensitive. Show all posts
Showing posts with label Context Sensitive. Show all posts

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. 


Sunday, September 9, 2012

How many types of recording modes are there in QTP? Which will be used when?


Unlike Winrunner, Quick test professional comes with three types of recording modes. Two of them are same as what the winrunner had and one is new. 
The 3 types of recording modes available in quick test professional are:
  1. Context sensitive recording
  2. Analog recording and
  3. Low level recording
Now let us discuss about these three recording modes in much detail one by one:

Context Sensitive Recording Mode

- The context sensitive recording mode is considered to be the normal recording mode in the quick test professional. 
- In this recording, full advantage of the test object model of the quick test professional can be taken. 
- In this mode the quick test professional can recognize a particular GUI object perfectly even if its location on the application screen is not known. 
- This recording takes place regardless of the location of the GUI objects on the application interface. 
- In this mode, the objects present in the software application and the operations that are performed in them are recorded. 

Analog Recording Mode

- Each and every movement of the mouse is tracked and recorded as it is dragged across the screen or some window. 
- The analog recording data captured by the quick test professional is saved as what are called tracks and these tracks are in turn saved in the directory of the test that you are going to perform. 
- This technique proves to be useful essentially for recording those operations whose recording cannot be carried out at the level of an object. 
- An example for such operation is making a signature by dragging of the mouse.
- With analog recording two types of recording can be done as stated below:
  1. Recording relative to the screen and
  2. Recording relative to the window.
- When you have to perform the analog operations pertain to just one window then you can very well go for the second one i.e., the recording relative to the window.
- On the other hand when your analog recording is to consist of multiple screen actions like dragging and dropping objects from one window to the other the former option i.e., the recording relative to the screen can be used.

The Low Level Recording Mode

 
- It is used for making recording easy at the level of the objects. 
- With this recording, you can record operations being performed on any of the objects present in the application software. 
- With this mode, even all of the run time objects can be recorded as:
  1. Window test objects or
  2. winObject test objects.
- This mode of recording is independent of whether the quick test professional is able to recognize the specific operation or the specific object. 
- This recording mode should only be used when your tests demand the exact coordinates of the objects.
- An example of this can be given by a hash map. 
-This mode is also used when the recording of a test in a particular environment is not provided recognition by the quick test professional.
- Using this, x and y coordinates of any click can be recorded.
- It has been noted that more disk space is used up in the analog and low level recording modes as compared to the context sensitive mode. 
- For both of the last two modes, one thing should always be kept in mind is that the position of the screen during the run time as well the record should remain identical otherwise the test script may fail. 


Thursday, August 23, 2012

What are different types of functions available in WinRunner?


Functions form a very important aspect of the winrunnner. When you work with the winrunner you are provided with functions from all the categories. 

Some of the functions are there which are suppose to work only when the applications have been developed in specific environments like those mentioned below:
  1. Visual basic
  2. Power builder and so on.
What is a Function?
- The availability of a specific function can be checked by clicking up on the availability button available at the top of the help screen for that particular function. 
- The loadrunner GUI vusers types make use of the winrunner for the creation of the system load.
- This makes it possible to make use of any of the categories. 
- The standard functions can be used apart from the loadrunner functions in loadrunner scenario scripts on UNIX platform only.
- There are certain TSL functions that have the support for both the Xrunner and winrunner. 
- The winrunner provides 4 major types of TSL functions as stated below and a different and unique requirement is addressed by each of them:
1. Context sensitive functions: These functions hold the responsibility for performing the operations on GUI objects.
2. Analog functions: These functions hold the responsibility for carrying out some user like events like mouse and key board input.
3. Customization functions: These functions hold the responsibility for configuring the settings of the testing tool according to one’s requirement. 
4. Standard functions: These functions hold the responsibility for performing the basic programming language operations.

Context Sensitive Functions
- The actions taking place on the software system or application which is under test can be depicted by these functions in terms of the GUI objects like buttons, lists and windows and so on. 
- These functions are available for the following platforms:
      a)   Winrunner
      b)   Load runner GUI vusers
   - Parameters that make a reference to the logical name of some object are involved in most of the context sensitive functions. 
   - However, it should be checked that the logical name of an object has been given a place with the physical description. 
    - What happens during recording is that the logical name is automatically put to use by the system. 
   - In some cases the function is expected to work with the physical description of the object as well.

    Analog Functions
   - Operations are recorded and executed at the screen coordinates of the screen as specified in the test script. 
   - When the winrunner recording is done in this mode, these functions come in to play for depicting the following:
a)     Mouse clicks
b)     Key board input
c)     Exact coordinates travelled by the mouse
- The purpose of these functions is to run and retrace the mouse tracks and submit the exact input that was recorded by the user. 
- There are some other particular operations that are supported by analog functions:
a)   Synchronization
b)   Verification
c)   Text manipulation etc.
- The analog functions are available for the same platforms as for the context sensitive functions.

Customization Functions
- With these functions, the testing tools you are using can be enhanced further to suit better with your testing style and other specific needs. 
- One particular example for this function is the function using which functions can be added to the function generator and custom GUI check points can be created. 
- These are only available for winrunner.

Standard Functions
- These functions are for general elements of the programming language like:
a)   Basic input and out put
b)   Control flow
c)   Mathematical functions
d)   Array functions and so on.
- Unlike other function the standard functions are available for all the products of mercury interactive.  


Sunday, August 12, 2012

When do you go for Context Sensitive and Analog recordings? What's the difference between them?


Winrunner was developed as an automated load testing tool by the firm of HP (Hewett Packard) and it operated at the level of graphical user interface layer. You must be wondering why it was operated only at the GUI level? This is so because it was possible only at this level to record as well as play back the user actions from a large number of software systems and applications just as a real world user would do.
The winrunner provides us with two types of recordings namely context sensitive recording and analog recording. 

Context Sensitive Recording


- With the help of this mode all your actions on the software system or application in terms of the user interactions can  be recorded  while physically ignoring the location of the objects (windows, lists, buttons and so on) on the graphical user interface.
- Whenever some action is performed on the software system or application which is under question, the generation of a statement in TSL takes place. 
- As the recording goes on, a unique description for each and every selected object is written to a map called GUI map by the winrunner tool. 
- This GUI map keeps within itself all the files from the test scripts created by you and maintains all of them separately. 
- Suppose you fall in a condition where you got to change the graphical user interface of your software system or application.
- In such a case you only need to update all the test scripts present in the GUI map and you do not need to perform any 1000 number of tests. 
- With such a facility you not only save time but you are also able to reuse all of your context sensitive test scripts for the future versions of your software system or application that you plan to develop further. 
- In context sensitive recording, playing or running a test is quite easy and you just need to play back the associated test script. 
- A real world user is emulated by the winrunner software by carrying out user like options such as pointing the mouse to some object, selecting or deselecting the objects, entering words from keyboard and so on. 
- The object descriptions that we earlier had fed to the GUI map are read by the winrunner and then those objects are searched in the software application under test to match.  
- The objects can be tracked even if their placements have been changed. 

Analog Recording


- In this type of winrunner recording, mostly the events like those mentioned below are recorded by the winrunner:
a)    Mouse clicks
b)    Input entered via the key board
c)   The exact x and y coordinates travelled by the mouse pointer and so on.
- While the test is executed or the test scripts are played the mouse tracks are re- traced by the winruner.
- However, one thing should always be kept in mind that winrunner is used only when the exact mouse coordinates are of utmost important to your test case and also when you have to test some drawing software application. 
- It is almost impossible to capture the GUI elements like objects and windows with the analog recording. 
- To say it simply, the analog recording holds good for the software systems and applications containing bitmap areas.

If you starting afresh with the winrunner it is recommended that you go for context sensitive recording since here you don’t have to go for exact mouse tracks. 


Facebook activity