Skip to content

Latest commit

 

History

History
97 lines (79 loc) · 3.7 KB

File metadata and controls

97 lines (79 loc) · 3.7 KB

Appium Android & iOS Test Automation Framework

A cross-platform mobile test automation framework for Android and iOS using Appium, Java, and TestNG. This project is designed for both beginners and professionals who want to automate mobile app testing efficiently.


Description

This framework lets you write and run automated tests for Android and iOS apps. It uses the Page Object Model for maintainable test code, and provides detailed reports. You can control emulators and simulators programmatically, and configure everything through property files.


Interesting Techniques Used

  • Page Object Model (POM): Organizes app screens as classes for reusable, maintainable tests.
  • Programmatic Emulator/Simulator Control: Start and stop Android emulators and iOS simulators from code.
  • SLF4J with Log4j2 Logging: Unified logging to both console and file, configurable via src/main/resources/log4j2.xml.
  • TestNG Listeners: Custom listeners for reporting and test lifecycle hooks.
  • ExtentReports Integration: Generates rich HTML reports for test runs.
  • Configurable Properties: Centralized configuration in src/test/resources/config/config.properties.

Notable Technologies & Libraries


Project Structure

/ (project root)
├── logs/
├── src/
│   ├── main/
│   │   ├── java/com/suban/base/
│   │   ├── java/com/suban/config/
│   │   ├── java/com/suban/pages/
│   │   ├── java/com/suban/utils/
│   │   └── resources/
│   └── test/
│       ├── java/com/suban/
│       └── resources/
│           ├── apps/
│           └── config/
├── test-output/
├── pom.xml
├── testng.xml
└── README.md
  • logs/: Stores log files generated by Log4j2.
  • src/main/java/com/suban/base/: Core classes for server, device, and driver management.
  • src/main/java/com/suban/config/: Configuration reader utilities.
  • src/main/java/com/suban/pages/: Page Object Model classes for app screens.
  • src/main/java/com/suban/utils/: Utility classes for reporting, screenshots, and listeners.
  • src/main/resources/: Main configuration files, including log4j2.xml.
  • src/test/resources/apps/: Sample app binaries for testing.
  • src/test/resources/config/: Test configuration files.
  • test-output/: TestNG and ExtentReports output.

How to Use

  1. Install Prerequisites

    • Java JDK 11+
    • Node.js
    • Appium (npm install -g appium)
    • Android Studio (for Android tests)
    • Xcode (for iOS tests)
  2. Clone the Repository

    git clone https://github.com/Suban5/AppiumAndroidIOSDemo.git
    cd AppiumAndroidIOSDemo
  3. Build the Project

    mvn clean install
  4. Configure Properties

  5. Run Tests

    mvn test
  6. View Reports and Logs

    • Test reports: test-output/
    • Logs: logs/app.log

For more details, see the code and comments in each directory.