External installed-app smoke tests for TextPad using TypeScript, Cucumber, Appium 2, and WebdriverIO.
These tests exercise TextPad as an installed Android app. They complement, but do not replace, the Gradle tests under:
TextPad/app/src/test: fast JVM/unit tests for app logicTextPad/app/src/androidTest: Android instrumentation and Espresso tests
Use this harness for release smoke flows where the real installed app, Android UI, and device storage matter.
scripts/
package.json
tsconfig.json
cucumber.js
features/
src/
drivers/
pages/
steps/
support/
world/
artifacts/ generated reports, screenshots, and page sources
dist/ generated compiled JavaScript
- Node.js 20+
- Appium 2 server already running
- Android device or emulator already running
- TextPad already installed on the target
- Appium UiAutomator2 driver installed on the Appium server
This project does not start Appium, boot emulators, or install TextPad for you.
Device-storage cleanup uses Appium's mobile: shell command when available. If your Appium server blocks shell commands, start it with relaxed security or rely on generated test filenames:
appium --relaxed-securitycd TextPad/scripts
npm installOptional local configuration can be placed in .env:
APPIUM_SERVER_URL=http://127.0.0.1:4723
APPIUM_WAIT_TIMEOUT_MS=20000
ANDROID_DEVICE_NAME=Android
ANDROID_UDID=
ANDROID_PLATFORM_VERSION=
ANDROID_AUTOMATION_NAME=UiAutomator2
TEXTPAD_APP_PACKAGE=com.maxistar.textpad
TEXTPAD_APP_ACTIVITY=com.maxistar.textpad.activities.EditorActivity
TEXTPAD_E2E_TEST_FILE_DIR=/sdcard/Download
TEXTPAD_E2E_TEST_FILE_PREFIX=textpad-e2e-saveTEXTPAD_E2E_TEST_FILE_DIR must match where Android's document picker saves the test file. The default assumes the picker creates files in Downloads.
cd TextPad/scripts
npm run build
npm run test:smokenpm run test:smoke compiles the TypeScript sources and runs the save-file smoke feature.
The save-file smoke scenario:
- Terminates any already-running TextPad instance.
- Opens the installed TextPad app.
- Waits for the editor to be ready.
- Enters predictable test text.
- Opens the Save action through the overflow menu.
- Saves with a generated filename using the Android document picker or legacy TextPad file dialog.
- Verifies the editor remains available after saving.
- Reads the saved file from the configured device-storage path and verifies the content.
- Stops TextPad before closing the Appium session.
Generated filenames use the configured prefix and a timestamp so repeated local runs do not fail only because a previous file exists.
Generated diagnostics are written under TextPad/scripts/artifacts/:
cucumber-report.html: readable scenario and step summarysave-flow/<timestamp>/*.png: screenshots captured on failuresave-flow/<timestamp>/*.xml: Appium page source dumps captured on failure
The artifacts/ and dist/ directories are generated output and are ignored by Git.