How webdriverio/appium-boilerplate works
Main Components of the System
• Tests & Test Scripts: The project’s tests live under the “tests” directory. They are divided into several sub-folders:
• Specs (actual test cases for features like login, swipe, forms, webviews, etc.)
• Features (potentially containing Gherkin-based tests for cucumber-based scenarios)
• Helpers (utility functions such as biometrics handling, webview helpers, etc.)
• PageObjects & ScreenObjects (abstraction layer to encapsulate locators and actions for UI screens)
• Steps (for writing high-level behavior-driven tests)
• Configuration Files: Found under the “config” directory. These include:
• Specific device configurations (separate files for Android app, iOS app, browser tests, etc.)
• Shared configuration (wdio.shared.conf.ts) which contains the common defaults that every environment builds upon.
• Local Appium configurations (wdio.shared.local.appium.conf.ts) which indicate using a global Appium installation.
• Cloud configuration files (sub-folders for SauceLabs, BrowserStack, LambdaTest, TestingBot) which allow execution on remote devices.
• Project Management & CI Infrastructure:
• GitHub workflows (inside .github/workflows) that include pipelines for running tests on Android and iOS.
• Scripts (like push_apps_to_sauce_storage.sh) which support deployment or cloud interactions.
• External Services / Vendors:
• Cloud vendors such as Sauce Labs, BrowserStack, TestingBot, and LambdaTest – each defined through their individual config files.
• Supporting Documentation and Development Tools:
• README – provides instructions on installation, running tests, and configuration.
• Docs folder – provides FAQ and Tips/Tricks guides.
• Git configuration files (.gitignore, .editorconfig, ESLint configuration, etc.)
Relationships and Interactions Between Components
• The Test Runner: WebdriverIO acts as the central hub which reads a shared configuration (plus platform-specific adjustments from config) then picks up test scripts (located within “tests”) and executes them using Appium commands.
• The Tests: Leverage page objects and helper modules to interact with mobile UI components. For instance, tests like “app.login.spec.ts” or “app.swipe.spec.ts” call methods defined in page/screen objects.
• Configuration Files: Serve as the blueprint for how tests should be run. They dictate which mobile device (emulator/simulator or real device) is targeted, specify vendor-specific settings, and activate services (sauce, browserstack, lambdatest, etc.) so that the tests can run in the designated environments.
• CI Workflows: GitHub workflows trigger these tests as part of the automated CI/CD pipeline indicating a flow from code commit → CI run → test execution.
Architectural/Design Patterns & Principles
• Separation of Concerns: Test scripts are kept separate from configurations and utility functions. The use of page objects ensures that selectors and element interactions remain abstracted from test logic.
• Modularity: The project is very modular with separate folders for different testing strategies (e.g., biometric login, swipe, deep link navigation) to allow for scalable and maintainable automation.
• Extensibility: The structure (with separate configurations for each platform and vendor) easily allows for the extension into parallel test execution or the integration with more platforms.