background image
<< Test Cases - How to delete a property set | Test Cases - Bitmap Agent options >>
Test Cases - Verifying an object's bitmap
<< Test Cases - How to delete a property set | Test Cases - Bitmap Agent options >>
126
User's Guide
5 D
ESIGNING
AND
R
ECORDING
T
ESTCASES
Recording the verification stage
Verifying an object's bitmap
A bitmap is a picture of some portion of your application. Verifying a bitmap
is usually only useful when the actual appearance of an object needs to be
verified to validate application correctness. For example, if you are testing a
drawing or CAD/CAM package, a testcase might produce an illustration in a
drawing region which you want to compare to a baseline. Other possibilities
include the verification of fonts, color charts, and certain custom objects.
Bitmap tips When comparing bitmaps, keep the following in mind:
·
Bitmaps are not portable between GUIs. The formats are:
·
A bitmap comparison will fail if the image being verified does not have
the same screen resolution, color, window frame width, and window
position when the testcase is run on a different machine than the one on
which the baseline image was captured.
·
Make sure that your testcase sets the size of the application window to
the same size it was when the baseline bitmap was captured.
·
Capture the smallest possible region of the image so that your test is
comparing only what is relevant.
·
If practical, do not include the window's frame (border), since this may
have different colors and/or fonts in different environments.
Procedure To verify the GUI object's appearance using a bitmap:
1
Select Record/Testcase to begin recording a testcase (or select Record/
Actions if you want to record a verification statement in an existing
testcase) and drive your application to the state you want to verify.
2
When you are ready to record a verification statement, position the
mouse cursor over the object you want to verify, then press Ctrl+Alt.
The Verify Window dialog appears over your application window.
3
Display the Bitmap tab.
4
Select the region to update: Entire Window, Client Area of Window (that
is, without scroll bar or title bar), or Portion of Window.
Platform
File Format
Macintosh
.PICT
PC Class
.BMP
OSF/Motif
.XPM