Mobile UI automation project built with Appium and WebDriver (wd) to test the login flow of TheApp, HeadSpin's open-source sample Android app. The suite drives a real Android emulator end-to-end: launching the app, filling in the login form, and asserting the app routes to the correct screen for both valid and invalid credentials.
Built as part of SQT 3043 – Mobile Application Testing.
- Setting up a full mobile test automation environment from scratch (Node.js, JDK, Android Studio/AVD, Appium Server)
- Writing Appium automation scripts in JavaScript using accessibility IDs and XPath locators
- Driving an Android emulator programmatically (element location, input, clicks, wait strategies)
- Validating both the "happy path" (successful login) and a negative case (invalid login) in the same test
- Reading and debugging Appium/WebDriver session logs
| Layer | Tool |
|---|---|
| Automation framework | Appium 2.x |
| Client library | wd (WebDriver client for Node.js) |
| Language | JavaScript (Node.js) |
| Target app | TheApp by HeadSpin (sample Android app) |
| Device | Android Emulator — Pixel 8, API 34 |
| Driver | UiAutomator2 |
appium-theapp-mobile-testing/
├── README.md
├── appiumTest.js # login automation script
├── package-lock.json
├── package.json
└── docs/
└── screenshots/ # environment setup + test run evidence
- Node.js (v18+ recommended)
- Java Development Kit (JDK)
- Android Studio with an Android Virtual Device (AVD) configured
- Appium Server (Desktop app or CLI)
- The TheApp APK for Android
-
Install dependencies
npm install
-
Start an Android emulator Open Android Studio → Device Manager → launch your AVD (e.g. Pixel 8, API 34).
-
Install TheApp on the emulator Drag-and-drop the
.apkonto the running emulator, or install viaadb install TheApp.apk. -
Start the Appium server
appium
or launch Appium Desktop and click Start Server (default:
http://localhost:4723). -
Update capabilities In
src/appiumTest.js, set theapppath (anddeviceNameif different) to match your local setup.
npm testThis runs src/appiumTest.js, which:
- Opens TheApp and navigates to the Login Screen demo
- Submits valid credentials and asserts navigation to the Secret Area screen
- Submits invalid credentials and asserts the expected error message is shown
- Prints pass/fail output to the console and closes the session
| Step | Action | Expected result |
|---|---|---|
| 1 | Tap "Login Screen" on TheApp's home menu | Login form is displayed |
| 2 | Enter valid username/password, submit | App navigates to "Secret Area" |
| 3 | Enter invalid credentials, submit | App shows an "Invalid login credentials" error |
All screenshots referenced below live in docs/screenshots.
| # | Screenshot | Description |
|---|---|---|
| 1 | 01-node-version.png |
Node.js installed and verified (node -v) |
| 2 | 02-java-version.png |
JDK installed and verified (java -version) |
| 3 | 03-appium-install.png |
Installing Appium globally via npm |
| 4 | 04-appium-version.png |
Verifying Appium install (appium --version) |
| 5 | 05-appium-server-ui.png |
Appium Desktop server UI |
| 6 | 06-appium-server-running.png |
Appium server running and listening on port 4723 |
| 7 | 07-avd-manager.png |
Android Virtual Device configured (Pixel 8, API 34) |
| 8 | 08-emulator-home.png |
Emulator home screen |
| 9 | 09-theapp-menu.png |
TheApp's demo menu (Login Screen, Echo Box, etc.) |
| 10 | 10-npm-init.png |
Initializing the Node.js project (npm init -y) |
| 11 | 11-npm-install-appium.png |
Installing the appium package as a project dependency |
| 12 | 12-npm-install-wd.png |
Installing the wd WebDriver client |
| 13 | 13-login-test-code.png |
The loginTest automation function |
| 14 | 14-test-console-output.png |
Console/session log from a successful test run |
| 15 | 15-demo-recording.gif |
Screen recording of the automated run on the emulator |
Note:
15-demo-recording.gifis a large file (~12 MB). If your GitHub push is slow or you'd rather keep the repo lightweight, consider trimming/compressing it (e.g. with ezgif.com) or using Git LFS for it.
✅ Login succeeded with valid username & password, and correctly failed (with the expected error) for invalid credentials.