How amromoussa2211/willma-trainer works
Project type and purpose
• This is a Test Automation Framework for Android applications.
• Built on Node.js using WebdriverIO (test runner) and Appium (mobile automation).
• Supports both local and CI/CD execution and produces Allure test reports.
File structure
• Root
• .env – environment variables for deviceName, platformVersion, etc.
• package.json – npm scripts (start:appium, test:local, test:ci, generate-report, open-report).
• wdio.conf.js, wdio.local.conf.js, wdio.ci.conf.js – WebdriverIO configurations for default, local, and CI runs.
• .github/workflows – GitHub Actions CI pipelines (ci.yml, main.yml, runE2E.yml).
• apps/android – directory for the APK(s) under test.
• Test directory
• test/specs – E2E test scenarios organized by feature (signup, forms, analytics, API checks).
• test/pageobjects – page-object pattern abstractions (login.page.js, secure.page.js, page.js).
• CI/Reporting
• Allure results (generated under allure-results) and final reports (allure-report).
Key architectural elements from the README
• Java/Android SDK + Appium server (mobile automation backend).
• WebdriverIO test runner invoking Appium sessions.
• Page-object model for test maintainability.
• Environment-specific config (local vs CI).
• Allure for test reporting.
• GitHub Actions pipelines orchestrating CI tests and report publishing.
Main components
• Developer/CI Host
• Node.js runtime
• Java JDK + Android SDK
• Appium Server
• Receives WebdriverIO commands over WebDriver protocol.
• WebdriverIO Test Runner
• Loads wdio.*.conf.js based on environment.
• Executes test specs (test/specs) using page-object abstractions.
• Android Device/Emulator
• Installs and runs the target APK from apps/android.
• Allure Reporting
• Aggregates test results (allure-results).
• Generates and serves HTML reports (allure-report).
• GitHub Actions (CI)
• Checkout → Install dependencies → Start Appium server → Run npm run test:ci → Publish Allure results/artifacts.
Relationships and interactions
• The Test Runner sends commands to the Appium Server.
• Appium Server drives the Android Device/Emulator.
• Test specs reference page-objects to locate and interact with UI elements.
• Test results funnel into Allure, which produces reports.
• CI pipelines automate this sequence on pull requests or merges.
Architectural patterns and design principles
• Page-Object Model: separates element locators/actions (test/pageobjects) from test logic (test/specs).
• Environment configuration abstraction: separate wdio.local.conf.js and wdio.ci.conf.js.
• Modular scripts in package.json for starting Appium, running tests, and generating reports.
• CI integration via GitHub Actions workflows.
Detail
• Both high-level flow (CI vs local) and low-level modules (page-objects, specs).
• How environment variables and config files influence each component.
• Don’t omit the APK under test or the Allure report directory.