Sample project for running Evinced accessibility tests against Android and iOS apps with Appium and the Evinced Appium Java SDK.
Tests read configuration from a properties file so you can keep credentials and device settings in one place. The application only reads test-params.properties; it does not read the sample file.
-
Copy the sample file to create your local config:
cp src/test/resources/test-params.properties.sample src/test/resources/test-params.properties
-
Edit
src/test/resources/test-params.propertiesand set:Property Description EVINCED_SERVICE_IDYour Evinced service account ID. EVINCED_OFFLINE_TOKENYour Evinced offline access token. Obtain from your Evinced account or, if outbound internet is not available, contact support@evinced.com for an offline token. ANDROID_DEVICEName of the Android device or emulator to use (see How to get the device name below). Required for Android tests. IOS_DEVICEUDID of the iOS Simulator to use (see Starting an iOS Simulator below). Required for iOS tests; the iOS test MUST run on a simulator. APPIUM_SERVER_URL(Optional) Appium server URL. Default: http://127.0.0.1:4723/. Set this if Appium runs on another host or port. -
Do not commit
test-params.properties. It is listed in.gitignore. Onlytest-params.properties.sampleis checked into git as a template.
You need a running Android device or emulator before running the tests.
- Open Android Studio and go to Tools → Device Manager (or AVD Manager).
- Click Create Device to add a new virtual device, or select an existing one.
- Click the Play (▶) button next to the device to start the emulator.
- Wait until the emulator boot is complete and the home screen is visible.
-
List available AVDs:
$ANDROID_HOME/emulator/emulator -list-avdsExample output:
Pixel_9_Pro_XL_API_35,Pixel_4_API_30, etc. -
Start an AVD by name:
$ANDROID_HOME/emulator/emulator -avd Pixel_3a_API_35Use one of the names from the list. Leave this terminal open while running tests.
ANDROID_HOME is usually set by Android Studio or the SDK installer (e.g. ~/Library/Android/sdk on macOS).
The value you put in ANDROID_DEVICE in test-params.properties depends on how you run the tests.
- Emulator (AVD): Use the AVD name from
emulator -list-avds(e.g.Pixel_9_Pro_XL_API_35). Appium often accepts this as the device name when the emulator is the only device. - Connected device or when multiple devices exist: Use the device ID from
adb devices:Example output:adb devices
Use the first column asList of devices attached emulator-5554 deviceANDROID_DEVICE(e.g.emulator-5554).
If you use a generic name like Android Emulator, Appium will target the first available device/emulator. For a specific device when several are connected, use the adb devices ID.
The iOS test MUST be run on an iOS Simulator (not a physical device). You need Xcode and the Xcode Command Line Tools installed.
- Xcode installed (from the Mac App Store or Apple Developer).
- Command Line Tools: In Xcode, go to Xcode → Settings → Locations and ensure Command Line Tools is set to your Xcode version. You can also run
xcode-select --installto install the standalone command line tools.
-
List available simulators (find the UDID, which is the GUID for each device):
xcrun simctl list devices
Choose an iPhone simulator that is fairly recent (e.g. iPhone 16 with iOS 18.0). The UDID is the long hexadecimal string in parentheses or in the device list.
-
Boot the simulator (replace
UDIDwith the UDID from step 1):xcrun simctl boot UDID
Example: This was tested on iPhone 17 (iOS 26.2). Use the UDID shown for that device in
xcrun simctl list devices. -
(Optional) Show the Simulator app so you can see the device on screen:
open -a Simulator
-
Set
IOS_DEVICEintest-params.propertiesto that UDID. The iOS test uses this to connect Appium to the booted simulator. -
(Optional) Shut down the simulator when finished:
xcrun simctl shutdown UDID
The test starts the Appium server automatically before running and stops it after. You do not need to run Appium in a separate terminal.
Requirement: The appium command must be installed and on your PATH. Install it with:
npm install -g appiumIf Appium runs on a different host or port, set APPIUM_SERVER_URL in test-params.properties. The test will start the server on the port from that URL (default: http://127.0.0.1:4723/).
- Android app under test: Place your Android APK at
src/test/resources/app-debug.apk. The Android test installs and launches this app on the device/emulator. - iOS app under test: The iOS test uses
src/test/resources/SmallButtonSampleApp.app. No extra setup needed if the project already includes this app bundle.
Android (requires a running Android device or emulator and ANDROID_DEVICE in test-params.properties):
./gradlew test --tests "org.evinced.EvincedAndroidAppTest.testDemoEvincedAndroidApp"The test installs the app, opens it, runs an Evinced accessibility report, and asserts that at least one issue is found.
iOS (requires a booted iOS Simulator and IOS_DEVICE set to the simulator UDID in test-params.properties; see Starting an iOS Simulator):
./gradlew test --tests "org.evinced.EvincedIosAppTest.testDemoEvincedIosApp"The test launches SmallButtonSampleApp.app on the simulator, runs an Evinced accessibility report, and asserts that at least one issue is found.