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 test case might produce an illustration in a drawing region that you want to compare to a baseline. Other possibilities
include the verification of fonts, color charts, and certain custom objects.
When comparing bitmaps, keep the following in mind:
- Bitmaps are not portable between GUIs. The format of a bitmap on a PC platform is
- 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 test case is run on a different machine than the one on which the baseline image was captured.
- Make sure that your test case sets the size of the application window to the same size it was when the baseline bitmap was
- 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