Smoke test suite for the Truvera Wallet mobile application using Appium, WebdriverIO, and Mocha.
- Overview
- Prerequisites
- Installation
- Running Tests
- Test Reports
- CI/CD Integration
- Project Structure
- Configuration
- Contributing
This repository contains automated smoke tests for the Truvera Wallet Android application. The tests verify critical user flows including:
- Wallet creation and setup
- Passcode configuration
- App navigation and UI elements
- Core wallet functionality
Tech Stack:
- Test Framework: Mocha
- Automation Tool: Appium with WebdriverIO
- Reporting: Mochawesome, JUnit XML, CTRF
- CI/CD: GitHub Actions
Before you begin, ensure you have the following installed:
- Node.js 22.x or higher (Download)
- Java Development Kit (JDK) 17 (Download)
- Android SDK (Download)
- Appium 2.x (Installation Guide)
-
Install Android SDK Platform Tools:
# macOS (using Homebrew) brew install --cask android-platform-tools # Or download Android Studio which includes SDK tools
-
Set environment variables:
# Add to ~/.zshrc or ~/.bash_profile export ANDROID_HOME=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/platform-tools export PATH=$PATH:$ANDROID_HOME/emulator
-
Install Android Emulator:
# Create an AVD (Android Virtual Device) # Recommended: Pixel 7 Pro with API Level 30
-
Install Appium globally:
npm install -g appium
-
Install UiAutomator2 driver:
appium driver install uiautomator2
-
Verify installation:
appium driver list
-
Clone the repository:
git clone https://github.com/docknetwork/dock-app-testautomation.git cd dock-app-testautomation -
Install dependencies:
npm install
-
Place APK file:
- Download or build the Truvera Wallet APK
- Place it in the
app/directory with the nametruvera-wallet.apk
# Directory structure app/ └── truvera-wallet.apk
-
Start Appium server:
appium
The server will start on
http://localhost:4723 -
Start Android Emulator:
# List available emulators emulator -list-avds # Start emulator emulator -avd <your_avd_name>
-
Run tests:
# Run all tests npm test
The test suite generates multiple report formats:
- Location:
test-reports/mochawesome/report.html - Features: Interactive HTML report with charts and screenshots
- Open in browser for detailed test results
- Location:
ctrf/ctrf-report.json - Features: Common Test Report Format for standardized reporting
- Automatically published to GitHub Actions summary
- Location:
test-reports/screenshots/ - Captured: After each test (pass or fail)
- Naming:
{status}-{test_name}-{timestamp}.png
The repository includes a comprehensive CI/CD workflow:
Workflow File: .github/workflows/smoke-tests.yml
Triggers:
- Push to any branch
- Manual workflow dispatch with optional build number
Features:
- Automated APK download from S3
- Android emulator setup (Pixel 7 Pro, API 30)
- Test execution with artifact retention
- Multiple test reports (HTML, CTRF)
- Slack notifications with test results
- GitHub Actions summary with CTRF report
Manual Trigger:
# Via GitHub UI: Actions > End-to-end test > Run workflow
# Optionally provide build number (e.g., v1.7.0 build-904)Automatic Trigger:
- Runs on every push
- Automatically uses latest build from S3
Test results are sent to Slack with:
- Build number and branch
- Test summary (passed/failed/skipped)
- Duration
- Failed test names (if any)
- Link to GitHub Actions run