A modern Android UI automation framework built with Java + Appium + TestNG, following the Page Object Model and standard test-architecture practices.
Portfolio / showcase repository. It targets an Android IoT-gateway app (
com.example.gateway) whose APK is not bundled, and all device IDs, hosts, tokens, SSIDs and credentials are placeholders. It demonstrates the framework architecture and engineering practices — to run it, point the config at your own device + app.
src/main/java/com/example/gateway/
├── config/ ConfigReader # externalised config (-D overridable)
├── driver/ DriverFactory # builds AndroidDriver from config
│ DriverManager # ThreadLocal driver (parallel-safe)
├── base/ BasePage # explicit waits + reusable actions
├── pages/ NavigationPage, ConfigurationPage, BlePage, PrimaryWifiPage,
│ MqttPage, DeviceLoginPage, MenuPage # Page Object Model
└── utils/ (helpers)
src/test/java/com/example/gateway/
├── base/ BaseTest # driver lifecycle (@Before/@AfterMethod)
├── listeners/ TestListener # logging + Allure screenshot on failure
├── data/ TestData # TestNG @DataProvider sources
└── tests/ Navigation, Ble, PrimaryWifi, Mqtt, DeviceLogin, Menu tests
src/test/resources/
├── config.properties # device/app/server placeholders
├── log4j2.xml # logging
└── suites/ smoke.xml regression.xml # TestNG suites + groups
| Concern | Implementation |
|---|---|
| Page Object Model | Locators + actions live in pages/; tests express intent only |
| No hard-coded config | ConfigReader + config.properties, overridable via -Dkey=value |
| Parallel-safe driver | DriverFactory + ThreadLocal DriverManager |
| Explicit waits | WebDriverWait helpers in BasePage (no Thread.sleep) |
| Stable locators | resource-id + UiAutomator2/UiScrollable text scrolling (not absolute XPath) |
| Data-driven | TestNG @DataProvider (TestData) |
| Atomic tests | one behaviour per @Test, with smoke / regression groups |
| Suites | smoke.xml, regression.xml wired through Maven Surefire |
| Reporting | Allure (allure-testng) + Log4j2; screenshot auto-attached on failure |
| Modern stack | Appium java-client 8, Selenium 4, TestNG 7, JDK 17 |
JDK 17 · Maven · Node + Appium 2 server · Android SDK / adb · a connected
Android device or emulator with the app installed.
# 1. set your device/app values (or pass -D overrides)
# src/test/resources/config.properties
# 2. start Appium
appium
# 3. run a suite
mvn test # regression (default)
mvn test -DsuiteXmlFile=src/test/resources/suites/smoke.xml
mvn test -Ddevice.udid=emulator-5554 -Dapp.package=com.example.gateway
# 4. report
allure serve allure-resultsPage Objects + tests are implemented for Navigation, BLE, Primary Wi‑Fi, MQTT,
Device Login and Menu (password / cloud toggle). Additional gateway screens
(CAN, LTE, Secondary Wi‑Fi, HTTP, Events, Definitions, Intervals, Storage, IMU,
Reset) follow the same pattern: add a Page Object under pages/ and a test
class under tests/ with the appropriate group.
No real device IDs, URLs, tokens, SSIDs or credentials are committed — all are
placeholders (com.example.gateway, *.example.com, YOUR_DEVICE_UDID,
JWT_TOKEN_PLACEHOLDER, password). Supply real values locally or via CI.