applitools / ImageTester

ImageTester is a Cli tool to perform visual tests on images or PDF files.
9 stars 9 forks source link

Ability to set batch ID #1

Closed jedkcanderson closed 2 years ago

jedkcanderson commented 2 years ago

When using the Applitools Javascript Eyes library, we're able to simulate multiple tests being run together as a single batch by assigning a common batch ID. This is very useful for creating small test files that are easy to maintain while grouping the results into a structure that matches the way our client thinks about their product.

Is there a similar feature with the ImageTester.jar tool? I have tried giving the parent directory the same name across multiple invocations of the tool and that results in multiple batches all with the same name. For example:

This will put the results of Test-1 and Test-2 in a batch named My-Batch-Name.

But if I have the following structure and run the ImageTester.jar twice giving it Parent-1 and Parent-2 as root folders, I end up with two batches both named My-Batch-Name. Ideally, we could supply a batch ID parameter so they both show up in one batch as though we had run ImageTester.jar only once.

jedkcanderson commented 2 years ago

Circling back as I received the solution for this via an email thread:

One thing to try is to set the environment variable: APPLITOOLS_BATCH_ID="{UUID}"​ in your java -jar command. 
E.g. APPLITOOLS_BATCH_ID="hello" java -jar ImageTester.jar -k $APPLITOOLS_API_KEY -f Parent-1
Setting this will make the batch ID common across your test runs and would allow you to batch Parent-1 
and Parent-2 together.