get baseline image count

Retrieve a count of the total number of baseline images that reside in a given picture check.
NameDescriptionTypeModifier
picture

Name of a regular or shared picture check.

StringNone
variable

(Optional) Variable to receive the returned value.

StringNone
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.
Desktop Web, Mobile App (Android Hybrid, iOS Hybrid), WPF, Java, .Net, Win32
The following settings are applicable to this action: remove double quotes from cells.
Example - Case 1: Retrieving the total number of a given baseline image
        
          	picture	variable
get baseline image count	/Pic1	>>count
&nbsp		
	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:
  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.
  • 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.

Copyright © 2023 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(800) 322-0333