A robust mobile automation framework for Android applications using Appium, TestNG, and ExtentReports.
- AndroidDriver initialization using Appium and UiAutomator2
- Reusable utilities for:
- Scrolling and gestures
- Capturing screenshots
- Base64 screenshot encoding
- TestNG integration for structured test management and parallel execution
- ExtentReports integration for professional HTML reporting with logs and screenshots
- Automatic teardown and device unlock after test execution
- Java 17
- Gradle for build and dependency management
- Appium 2.x
- TestNG
- Selenium / Appium Java Client
- ExtentReports
-
Clone the repository: git clone https://github.com/mookto/Mobile-Application-With-TestNG-including-Extent-Report.git
-
Install dependencies and build the project: gradle clean build
-
Start Appium Server:
- Recommended: Appium 2.x
- Default URL: http://127.0.0.1:4723/
-
Connect your device: adb devices
-
Update device and app capabilities in Setup.java:
- deviceName & udid
- platformVersion
- appPackage & appActivity
-
Run all tests via Gradle: gradle clean test
-
Run a specific TestNG suite: gradle test -DtestngSuiteFile=testng.xml
-
Run individual tests from IDE (IntelliJ/Eclipse)
- ExtentReports generate detailed HTML reports including logs, screenshots, and pass/fail status.
- Screenshots stored in: src/test/resources/screenshots/
- Failed tests automatically capture screenshots in Base64 format for embedding in reports.
- Fork the repository
- Create a feature/bugfix branch
- Commit your changes with descriptive messages
- Submit a Pull Request for review
This project is licensed under the MIT License – see the LICENSE file for details.
Author: Md. Mahedi Hasan Project Status: Active & Maintained