get baseline image count
Retrieve a count of the total number of baseline images that reside in a given picture check.
Name | Description | Type | Modifier |
---|---|---|---|
picture | Name of a regular or shared picture check. | String | None |
variable | (Optional) Variable to receive the returned value. | String | None |
A count of the total number of baseline images that reside in a given picture check.
This action may be used within the following project items: test modules and user-defined actions.
Example - Case 1: Retrieving the total number of a given baseline image
picture variable
get baseline image count /Pic1 >>count
 
text
report # count
Example - Case 2: Integrating with a third-party image processing tool
In this example, the ImageMagick v.6.9.3-7 tool is invoked for further image processing.
Suppose that you'd like to compare the baseline image against the runtime image, but ignore the differences in their color. A basic workflow is as follows:
Suppose that you'd like to compare the baseline image against the runtime image, but ignore the differences in their color. A basic workflow is as follows:
- Capture the runtime image in the AUT, and then save it to a local path by using capture screen.
- Retrieve the total number of baseline images in a given picture check by using get baseline image count.
- Loop through the list of returned baseline image(s).
- Export the baseline images to a file with export baseline picture.
- Use ImageMagick CLI to preprocess and compare the baseline image(s) against the runtime image.
- Get the returned value from ImageMagick, and then check it against an expected value.
- picture argument: Identifies the name of a regular or shared picture check (learn more), with the forward slash (/) as the path separator.
- If the target image is in a shared picture check, the path starts with the forward slash (/), which corresponds to the Picture Checks subfolder of the project, followed by picture’s name.
- If the target image is in a regular picture check, the path starts with picture’s name.
- variable argument:
- If the variable in argument variable has not been declared, the action creates it as a global.
- If the variable argument is left empty, TestArchitect supplies a global variable with the name _result.
- This built-in action can be applied to pre-process baseline and runtime images, before actually integrating them with a given third-party image processing tool for further processing (See above).
- This action supports the <ignore> modifier. If the string
<ignore>
is present as the value of any of the arguments, or any argument contains an expression that evaluates to<ignore>
, the action is skipped during execution.