export baseline picture

Save the current baseline image to a file.
NameDescriptionTypeModifier
picture

Name of a regular or shared picture check.

StringNone
baseline

Name of the baseline image, or its numerical index.

StringNone
location

(Optional) Path to location in which the image is saved.

StringNone
return path

(Optional) Variable to receive the returned absolute path of the saved image.

StringNone
The absolute path of the saved image.
This action may be used within the following project items: test modules and user-defined actions.
The following settings are applicable to this action: remove double quotes from cells.
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
&nbsp				
	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:
  1. Capture the runtime image in the AUT, and then save it to a local path by using capture screen.
  2. Retrieve the total number of baseline images in a given picture check by using get baseline image count.
  3. Loop through the list of returned baseline image(s).
  4. Export the baseline images to a file with export baseline picture.
  5. Use ImageMagick CLI to preprocess and compare the baseline image(s) against the runtime image.
  6. 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 passing 12 surrounded by quotation marks (that is, "12") instead of the numerical 12. Passing the numerical 12 is treated as a reference to an image with an index of 12, rather than an image holding a text value of 12.
  • 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.

Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400