This comprehensive mobile app automation framework empowers QA teams to deliver high-quality mobile applications with confidence. Built on industry best practices and modern software engineering principles, it provides seamless cross-platform testing capabilities for both Android and iOS applications, featuring robust error handling, advanced reporting, intelligent test data management, and scalable architecture designed for teams of any size.
- π Cross-Platform Support: Single framework for Android & iOS testing
- π Rich Reporting: Beautiful HTML reports with screenshots and detailed logs
- ποΈ Scalable Architecture: Page Object Model with modular design
- π± Real Device Ready: Test on emulators, simulators, or physical devices
- β‘ Fast Execution: Optimized for CI/CD integration
- π‘οΈ Robust Error Handling: Comprehensive exception management and recovery
- Page Object Model (POM) implementation for maintainable test code
- Dependency Injection for better test isolation
- Modular Design enabling easy framework extension
- Android: Full UiAutomator2 support with advanced gestures
- iOS: XCUITest integration for native iOS testing
- Unified API for consistent testing across platforms
- ExtentReports 5.0 with interactive HTML dashboards
- Screenshot Capture on test failures with automatic attachment
- Detailed Logging with Log4j integration
- Test Analytics with execution trends and metrics
- Excel-based Configuration for easy parameter management
- Environment-specific Settings for different test environments
- Dynamic Data Management with Apache POI integration
- IntelliJ IDEA optimized with proper project structure
- Maven Integration with comprehensive dependency management
- Hot Reload support for faster development cycles
Tool | Version | Purpose |
---|---|---|
JDK | 11+ | Java runtime environment |
Maven | 3.6+ | Build and dependency management |
Android SDK | Latest | Android app testing |
Xcode | Latest | iOS app testing (macOS only) |
Appium | 2.0+ | Mobile automation server |
Node.js | 16+ | Appium server runtime |
-
Clone the Repository
git clone <repository-url> cd mobile-app-test-automation-framework
-
Configure Your Environment
# Update testdata.xlsx with your device configurations # Set your app paths and device details
-
Install Dependencies
mvn clean install
-
Run Your First Test
# Run via Maven mvn test # Or run via TestNG XML mvn test -DsuiteXmlFile=testng.xml
-
View Results
# Open the generated report open target/ExtentReports*/ExtentReports.html
mobile-app-test-automation-framework/
βββ π src/main/java/
β βββ ποΈ base/ # Core framework foundation
β β βββ TestBase.java # Driver initialization & lifecycle
β βββ π± pages/ # Page Object implementations
β β βββ RegistrationPage.java # App-specific page objects
β βββ π οΈ utils/ # Utility classes & helpers
β β βββ AppiumManager.java # Appium server management
β β βββ CommonFunctions.java # Reusable automation functions
β β βββ DataReader.java # Excel data management
β β βββ Utils.java # Framework utilities
β βββ π reporters/ # Reporting infrastructure
β β βββ ExtentManager.java # ExtentReports configuration
β βββ π logger/ # Logging framework
β βββ Log.java # Log4j implementation
βββ π src/main/resources/
β βββ π± Apps/ # Application binaries
β β βββ app.apk # Android app under test
β βββ π TestData/ # Test data & configuration
β βββ testdata.xlsx # Excel-based configuration
βββ π src/test/java/tests/ # Test implementations
β βββ LaunchAppAndRegistrationTest.java
βββ π testng.xml # TestNG suite configuration
Update src/main/resources/TestData/testdata.xlsx
with your device settings:
Parameter | Description | Example |
---|---|---|
platform |
Target platform | Android/iOS |
deviceNameAndroid |
Android device name | Pixel_6_API_33 |
platformVersionAndroid |
Android version | 13.0 |
apkFileName |
App binary name | app.apk |
appPackage |
App package identifier | com.example.app |
The framework automatically manages Appium server lifecycle:
- Automatic Start/Stop of Appium server
- Cross-platform Support (macOS/Windows)
- Dynamic Port Assignment for parallel execution
- Session Management with proper cleanup
@Test
public void verifyUserRegistration() {
// 1. Navigate to registration page
RegistrationPage registrationPage = new RegistrationPage(driver);
// 2. Perform actions
registrationPage.clickContinueButton();
// 3. Verify results
Assert.assertTrue(registrationPage.verifyDontHaveAccountTextDisplayed());
}
- Use Page Objects for all UI interactions
- Implement Explicit Waits for better stability
- Add Meaningful Assertions with descriptive messages
- Handle Exceptions gracefully with proper logging
Our framework generates beautiful, interactive HTML reports that provide:
- π Test Execution Summary with pass/fail statistics
- π± Screenshot Gallery for failed test cases
- β±οΈ Performance Metrics with execution timing
- π Detailed Logs for debugging and analysis
Report Location: target/ExtentReports<ExecutionTime>/ExtentReports.html
Devendra Singh
QA Automation Engineer