|Projects and project items / Project items|
A picture check is used to store image bitmaps, known as baseline pictures, which can be compared during testing against bitmaps produced by the AUT.
window control property expected check control property car login btn_login caption Login
Sometimes, however, rather than checking for the presence of character-based content, you may want to make sure that an AUT window or control is displaying an expected picture, or bitmap. To accomplish such tasks, TestArchitect offers a suite of picture handling actions.
Unfortunately, you can't just insert an expected bitmap directly into a picture handling action line. Instead, you have to pre-store the expected picture, known as the baseline picture, in a special item dedicated to that purpose. That item is a picture check. And a picture handling action, such as does picture exist, can test the validity of a bitmap displayed by the AUT simply by pointing to the appropriate picture check against which it is to be compared.
You may save a captured image and designate it as a baseline. All future captured images are then compared against this baseline image. Image comparison is considered to be successful only if the compared image and the baseline image are identical.
Sometimes, comparison may fail even if the content of the compared images seem to be identical. Various factors may cause these image comparison failures. For example, if, during testing, a given image file is rendered on display hardware with a different resolution than that which was used for the capture of the baseline image, it is quite possible for the comparison to fail. To improve the reliability of picture check comparisons, one picture check can store multiple baseline images. When, during testing, multiple baselines exist for a given picture check, a match between the just-captured image and any one of the associated baselines is sufficient for the check to be considered as passed.
Shared picture checks are useful for standard pictures, like symbols and icons, where as a tester you mainly want to know if the correct picture is displayed by an application, but not what that picture exactly looks like. For example, the TestArchitect explorer tree has a special icon designating a test module, which varies slightly depending on whether the given item is checked in, checked out to you, or checked out to someone else. A test may need to verify only that a given icon being displayed is a test module icon, without regard to its particular state-dependent appearance. The example discussed above, with the picture of the Chevrolet Monte Carlo, would also work best as a shared picture check if, say, future versions of the application may update their car pictures.
Suppose that we use a check picture action with a name argument of /chevy in a test module. After running that test module, we approve the picture as a baseline. We can then see the picture check and the stored baseline picture in the TestArchitect explorer tree, as shown below. By double-clicking the Baseline node, we can view that baseline picture.