get baseline image count
Description
Retrieve a count of the total number of baseline images that reside in a given picture check.
Arguments
picture
Name of a regular or shared picture check.
variable
(Optional) Variable to receive the returned value.
Valid contexts
This action may be used within the following project items: test modules and user-defined actions.
Applicable Built-In Settings
The following settings are applicable to this action: remove double quotes from cells.
Applicable Systems/Platforms
Use of this action is supported on the following system(s)/platform(s): Windows, Linux.
Notes
- 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 argumentvariablehas 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 Example below.)
- 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.
Example - Case 1: Retrieving the total number of a given baseline image
Action Lines
Result
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:
- 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.
Action Lines