Subscribe by Email


Saturday, August 11, 2012

How do you check GUI objects? How do you check a bitmap? (In Winrunner)


In this article we discuss about how one can check the GUI objects and also how to check a bitmap. 


How to check GUI objects and Bitmap

- Checking of the GUI objects is possible by the addition of the GUI check points in the test scripts.
- Once these GUI check points have been introduced in to the test scripts, the behavior of the gui objects can be compared in different versions of the same software system or application and defects in them can also be detected. 
- For checking the GUI objects you just need to point the GUI objects that you want to examine and choose those properties which you want to be tested. 
With Winrunner, you also have the option of checking the default properties as recommended by the winrunner itself or you can even go for the specific properties that you want to check. 
- Information regarding all the GUI objects and their corresponding properties is saved in the form of a check list. 
- The current property values are then captured by the winrunner for the GUI objects and are saved as the expected results. 
- While checking of the GUI objects, an automatic insertion of a GUI check point takes place. 
- The inserted check point appears as either of the following:
  1. Win_check_gui statement or
  2. Obj_check_gui statement
- A GUI check point consists of two parts one of which contains the check list listing all the objects and properties that are to be checked and the second part consists of the expected results which contains the captured property values.
- When a test is executed, the comparison of the current state of the GUI object with the expected results takes place in the software system or application that is being tested. 
- If in case, there is no matching between the current values and the expected results than that particular check point is said to have failed. 
- A GUI check point can be made a part of a loop also. 
- If you run a GUI check point in a loop then the results obtained are displayed as separate entries for every iteration of the loop. 
- All these results can be viewed in the test results window. 
- In some cases, it may also happen that the few of the GUI objects might not be there in the GUI map. 
- There is no need to worry since those GUI objects are added to a GUI map file that is temporary. 
- A GUI check point can be created either by using a regular expression on an edit object or by using a static text object having a varying name. 
- A built in support in winrunner is provided for the following:
  1. Active X control
  2. Visual basic
  3. Power builder application development environments and so on.
- Whenever the appropriate add in support is loaded, the controls are recognized by the winrunner and are treated as standard GUI objects. 
- The GUI check points can be created for these GUI objects in a similar way the check points are created for the standard GUI objects. 
- GUI check points that could check the properties and contents of a table can also be created. 
However one should be careful about the point that the winrunner does not supports the GUI check points that were created in Xrunner. - Winrunner can be instructed to capture a bitmap of the window whenever some check point fails.
- These captured bitmaps are saved along with the test results in the test results folder whenever a test is run. 
- You can create check points either for testing single property of many objects or just for testing a single object. 


No comments:

Facebook activity