This project is designed to demonstrate a mobile testing framework using WebdriverIO with Appium for both iOS and Android platforms. The framework leverages TypeScript for scripting tests, providing a robust and type-safe way to automate mobile application testing.
- Page Object Model: Organizes code structure to enhance test maintenance and reduce code duplication.
- Cross-Platform Testing: Supports both iOS and Android platforms.
- TypeScript: Utilizes TypeScript for test scripts, offering type safety and modern JavaScript features.
Before running the tests, ensure you have the following prerequisites installed and configured:
- Node.js and npm
- Appium for managing mobile app automation
- Android SDK for Android testing (with configured environment variables)
- Xcode for iOS testing
- An Android or iOS device or emulator/simulator setup for testing
- Clone the repository or download the source code to your local machine.
- Navigate to the project directory in your terminal.
- Run
npm install
to install all the project dependencies.
Ensure the Appium server is running and your devices or emulators/simulators are set up and connected.
Modify the wdio.ios.conf.ts
and wdio.android.conf.ts
configuration files under the ./config
directory to match your testing environment, specifying the correct device names, platform versions, and app paths.
This project is configured with separate scripts for running tests on iOS and Android platforms. Use the following commands to execute the tests:
npm run test:ios
npm run test:android
Tests are written using the Mocha test framework. The project structure includes:
./test/specs
: Contains test scripts../test/screenObjects
: Contains Page Object classes for encapsulating UI element interactions../config
: Contains WebdriverIO configuration files for iOS and Android.
Test results are reported in the console output. For enhanced reporting, consider integrating a reporting tool such as Allure.
Contributions to the Mobile WebDriver Challenge are welcome. Please ensure to follow the existing code structure and submit your pull requests for review.