Comparing Screenshots in Java with Applitools
A free Applitools account and Applitools API KEYTip: Unsure how to find your API key?
Read Retrieving your API key to find your API key.
Java v8 or higher https://www.java.com/en/download/help/download_options.xml
Tip: Not sure how to install?
Here are some resources:
- Maven installation instructions*https://maven.apache.org/install.html
- Install with homebrew with
brew install maven
Make sure it's in your
To test that it's working:
- Make sure to restart the Terminal or Command line prompt to load the new environment variables.
You should see the version info for Maven.
- It's better to set APPLITOOLS_API_KEY as a system variable (in Windows) or in the
~/.zshrcrecipe file (in MacOS) so that it will be automatically set when you open a new terminal shell.
- The Maven executable is inside
/binfolder of the extracted Maven directory. So you must include
/bin. It should look something like:
Running the Example Project
- Clone or download the repository and navigate to that folder
git clone https://github.com/applitools/tutorial-images-java.git
Note: you can alternatively download the project as a Zip file and extract it
- Run the example test
APPLITOOLS_API_KEY="[Your API Key]" mvn clean -Dtest=DemoTest test
Adding Applitools Eyes to an Existing Project
- Create a Maven project and add the following properties and dependencies to the pom.xml
<!-- This is the Applitools Images Java SDK -->
- Create a class with name
DemoTest.javaand add the following code
Don't suffer in silence! Let us help you. Please reach out to us to get your project working.
Taking the next steps with Applitools
Congratulations on completing this quickstart! There's still so much to learn about visual testing with Applitools, but you're off to a great start.
Resources for next steps:
- 🤖 Learning how visual testing works
- ↔️ Setting match levels for visual checkpoints
- 💥 Troubleshooting common issues
- 🐞 Reporting bugs
- 🗺 Detailed overview of visual testing with Applitools