export baseline picture
Save the current baseline image to a file.
Name | Description | Type | Modifier |
---|---|---|---|
picture | Name of a regular or shared picture check. | String | None |
baseline | Name of the baseline image, or its numerical index. | String | None |
location | (Optional) Path to location in which the image is saved. | String | None |
return path | (Optional) Variable to receive the returned absolute path of the saved image. | String | None |
The absolute path of the saved image.
This action may be used within the following project items: test modules and user-defined actions.
Example - Case 1: Save the current baseline image to file
picture baseline location return path
export baseline picture /Pic1 Baseline{1} D:\ >>tm_pic path1
 
picture baseline location return path
export baseline picture /Pic2 2 D:\ >>tm_pic path2
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.
- The baseline image is saved as .png.
- 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.
- baseline argument:
- This argument may be specified by either of two means: the name of the image, or its numerical index (Indexes are one-based; that is, numbering begins at 1).
- Enclose a numerical text string in quotation marks to differentiate it from a numerical index value. For example, if the name of an image is
12
, you should reference that image by passing12
surrounded by quotation marks (that is,"12"
) instead of the numerical12
. Passing the numerical12
is treated as a reference to an image with an index of 12, rather than an image holding a text value of12
.
- location argument:
- If the exported file already exists, TestArchitect overwrites the existing file with the new one.
- If this argument is empty, or the specified path does not exist, TestArchitect saves the file in the following default location:
- Windows: C:\Users\<username>\Documents\TestArchitect\Exported pictures
- Linux: /home/<user>/TestArchitect/Exported Pictures
- Only the path to the folder is required.
- Windows: Use backward slashes as separators for the folder path.
- Linux: Use forward slashes as separators for the folder path (Note that network paths are not supported).
- 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.