runme | ||||
---|---|---|---|---|
|
- For macOS Ventura: Git and Homebrew
- For Linux: Git and Eclipse Temurin JDK 8+ (https://adoptium.net/temurin/releases/)
- Sauce Labs Account
- Install Eclipse Temurin JDK (for macOS Ventura):
brew install --cask temurin
- Clone the repository:
git clone https://github.com/saucelabs/visual-examples
cd visual-examples/wd-java
- Configure with your Sauce credentials from https://app.saucelabs.com/user-settings
export SAUCE_USERNAME=__YOUR_SAUCE_USERNAME__
export SAUCE_ACCESS_KEY=__YOUR_SAUCE_ACCESS_KEY__
- Run the test
./mvnw clean test
By default, the test will run on desktop with a Chrome browser. If you'd like to run the test with a mobile device or emulator, you can set the PLATFORM_NAME environment variable accordingly. Available options are ANDROID, ANDROID_EMULATOR, IOS and IOS_SIMULATOR.
PLATFORM_NAME=ANDROID_EMULATOR ./mvnw clean test
- Review your screenshots by clicking on the url printed in the test or go to https://app.saucelabs.com/visual/builds.
- Accept all diffs, so they become new baselines.
- Re-run the tests
./mvnw clean test -Dmodified=true
- Open the test or go to https://app.saucelabs.com/visual/builds to review changes.
View installation and usage instructions on the Sauce Docs website.