|
| 1 | +# Getting started with Sauce Labs Visual Java + iOS Native App [](https://runme.dev/api/runme?repository=git%40github.com%3Asaucelabs%2Fvisual-examples.git) |
| 2 | + |
| 3 | +## Prerequisites |
| 4 | + |
| 5 | +- For macOS Ventura: Git and Homebrew |
| 6 | +- For Linux: Git and Eclipse Temurin JDK 8+ (https://adoptium.net/temurin/releases/) |
| 7 | +- Sauce Labs Account |
| 8 | + |
| 9 | +## Run the demo |
| 10 | + |
| 11 | +- Install Eclipse Temurin JDK (for macOS Ventura): |
| 12 | + |
| 13 | +```sh { "name":"java" } |
| 14 | +brew install --cask temurin |
| 15 | +``` |
| 16 | + |
| 17 | +- Clone the repository: |
| 18 | + |
| 19 | +```sh { "name":"clone" } |
| 20 | +git clone https://github.com/saucelabs/visual-examples |
| 21 | +cd visual-examples/java-ios-app |
| 22 | +``` |
| 23 | + |
| 24 | +- Configure with your Sauce credentials from https://app.saucelabs.com/user-settings |
| 25 | + |
| 26 | +```sh { "name":"set-credentials" } |
| 27 | +export SAUCE_USERNAME=__YOUR_SAUCE_USERNAME__ |
| 28 | +export SAUCE_ACCESS_KEY=__YOUR_SAUCE_ACCESS_KEY__ |
| 29 | +``` |
| 30 | + |
| 31 | +- Run the test |
| 32 | + |
| 33 | +```sh { "name":"mvn-run-ios-test" } |
| 34 | +./mvnw clean test |
| 35 | +``` |
| 36 | + |
| 37 | +- Review your screenshots by clicking on the url printed in the test or go to https://app.saucelabs.com/visual/builds. |
| 38 | +- Accept all diffs, so they become new baselines. |
| 39 | +- Re-run the tests |
| 40 | + |
| 41 | +```sh { "name":"mvn-run-ios-test-modified" } |
| 42 | +VISUAL_CHECK=enabled ./mvnw clean test |
| 43 | +``` |
| 44 | + |
| 45 | +- Open the test or go to https://app.saucelabs.com/visual/builds to review changes. |
| 46 | + |
| 47 | + |
| 48 | +**NOTE**: If you'd like run the full page screenshot test additionally, |
| 49 | + you need to pass the environment variable FPS=enabled when running the test. |
| 50 | + |
| 51 | +```sh { "name":"mvn-run-ios-test-fps" } |
| 52 | +FPS=enabled ./mvnw clean test |
| 53 | +``` |
| 54 | + |
| 55 | +## Installation & Usage |
| 56 | + |
| 57 | +View installation and usage instructions on |
| 58 | +the [Sauce Docs website](https://docs.saucelabs.com/visual-testing/integrations/java/). |
0 commit comments