This demo walks you through running ImageTester to establish a visual baseline and then detect changes.
For the full list of options and features, see the ImageTester README.
├── ImageTester_3.8.0.jar
├── after/
│ ├── images/
│ │ └── Before_And_After.png
│ └── pdfs/
│ └── visual_testing_best_practices.pdf
├── before/
│ ├── images/
│ │ └── Before_And_After.png
│ └── pdfs/
│ └── visual_testing_best_practices.pdf
└── README.md
- Java 8 or later installed (
java -versionto verify) - An Applitools account — sign up here if you don't have one
- Your Applitools API key from the Applitools dashboard
Set your API key as an environment variable so you don't have to pass it on every command.
Mac/Linux:
export APPLITOOLS_API_KEY=<your-api-key>Windows (Command Prompt):
set APPLITOOLS_API_KEY=<your-api-key>Windows (PowerShell):
$env:APPLITOOLS_API_KEY="<your-api-key>"Run ImageTester against the before folder. Because no baseline exists yet, Applitools will save these images as the baseline automatically.
java -jar ImageTester_3.8.0.jar -f before/ -a "Demo_ImageTester" -fb "Example: Image Tester CLI"| Flag | Value | Description |
|---|---|---|
-f |
before |
Path to the folder of images/PDFs to test |
-a |
"ImageTester Demo" |
Application name shown in the Applitools dashboard |
Open the Applitools dashboard and confirm the tests passed (new baselines are accepted automatically).
Now run ImageTester against the after folder using the same application name. ImageTester will compare the new images against the baseline set in Step 2 and flag any differences.
java -jar ImageTester_3.8.0.jar -f after/ -a "Demo_ImageTester" -fb "Example: Image Tester CLI"Open the Applitools dashboard to review the results. Any visual differences between the before and after files will be highlighted for your review.
-
Match level — control how strictly differences are flagged with
-ml:java -jar jar/ImageTester_3.8.0.jar -f after -a "ImageTester Demo" -ml LayoutAvailable levels:
Strict(default) |IgnoreColors|Layout|Exact|None -
PDF pages — test only specific pages of a PDF with
-sp:java -jar jar/ImageTester_3.8.0.jar -f after -a "ImageTester Demo" -sp 1,3,5-7 -
Flat batch — group all tests into a single named batch with
-fb:java -jar jar/ImageTester_3.8.0.jar -f after -a "ImageTester Demo" -fb "Demo Batch"