This project automates functional testing of the Google Calculator app using Appium, TestNG, and Selenium. It follows a Page Object Model (POM) architecture for better modularity and maintainability.
🖥️ Features : Automation Video
- Dynamic Series Calculation
- Automates series calculations on the Google Calculator app.
- Example: Calculate
100 / 10 * 5 - 10 + 60
using thedoSeries()
function.
- CSV-Based Testing
- Reads input series from a CSV file (
data.csv
) and validates results. - Example inputs:
50 + 40 - 30 / 2 + 20
(Expected: 95)10 * 2 / 2 + 10 - 20
(Expected: 0)4π2^3
(Expected: 100.53)
- Reads input series from a CSV file (
- Allure Reporting
- Generates detailed test execution reports.
- Includes test summaries, behaviors, and detailed logs.
- Page Object Model (POM)
- Modular architecture for better code maintenance.
src
├── main
│ ├── java
│ └── resources
└── test
├── java
│ └── com.google.android.calculator
│ ├── page
│ │ └── CalculatorScreen.java # Handles calculator app elements and actions
│ ├── runner
│ │ └── TestRunner.java # Configures and triggers test execution
│ ├── setup
│ │ └── Setup.java # Handles Appium server and driver setup
│ └── utils
│ └── MyUtils.java # Utilities for common functions
└── resources
├── calculator.apk # The APK file for the Google Calculator app
├── data.csv # Input test data for automated tests
└── suite.xml # TestNG XML suite configuration
dependencies {
// TestNG for test framework
testImplementation 'org.testng:testng:7.10.2'
// Selenium for browser and mobile testing
implementation 'org.seleniumhq.selenium:selenium-java:4.20.0'
// Appium Java client
implementation 'io.appium:java-client:9.2.2'
// Apache Commons CSV for handling CSV files
implementation 'org.apache.commons:commons-csv:1.13.0'
// Allure for reporting
implementation 'io.qameta.allure:allure-testng:2.29.1'
}
-
Appium
appium --use-plugins=execute-driver
-
Android Studio
- Android SDK: Android 11.0 ("R")
- Virtual Device: Pixel 6 Pro (API 30)
-
Gradle
- Ensure Gradle is installed and properly configured.
-
Clone the repository:
git clone https://github.com/zfnkml/AppAutomation-with-Appium-on-GoogleCalculator cd AppAutomation-with-Appium-on-GoogleCalculator
-
Start the Appium server:
appium --use-plugins=execute-driver
-
Open Android Studio, configure:
- SDK: Android 11.0 ("R")
- Virtual Device: Pixel 6 Pro API 30
-
Execute the tests:
./gradlew test
-
Generate Allure reports:
allure serve build/allure-results
Example Allure report includes:
Watch the automation process in action: Automation Video
- Modular POM design for reusability and scalability.
- Comprehensive test execution reports using Allure.
- Integration with TestNG and Gradle for smooth builds and test runs.