Checking GUI with Winrunner
we have a java swing application.In application, the screen contains number of panels,grids,tabs and components.
The distances between the components is defined with different values.(which are standard through out the application)
Also buttons have defined widths,heights and colours(Given in RGB values.).
Also the distance from border of the screen to the buttons,distance between two buttons ....every thing is specified in style guide....
Now the question is how can test this with automation tool(winrunner or XDE).
do we have any way in which we can test only the UI part ?
Re: Checking GUI with Winrunner
One possibility is to develop a recursive function that reads the (interesting) properties of all components on the screen. You'll have to start this function with the main Container-object which reads all child-objects (recursively).
The "how to" is a bit difficult to explain, but you can develop a function that will come to each java object on the screen (even in different tabs - but your function needs to switch to each tab and then continue).
So if the java objects you need to test (buttons, borders, ...) contain enough information to be compared against the styleguide this will be a universal way of testing the look of Java GUIs.
I've developed this kind of function for testing language translations lots of different masks. The function read all labels on the mask and stored them into a file. Then I compared it against expected values.