This project serves as a boilerplate for automating Android and iOS mobile applications using a single codebase with TestNG and the Appium library. It provides cross-platform support, easy setup, and comes with examples to help you quickly get started with writing and executing mobile automation tests. Feel free to clone the repository, explore the sample test scripts, and contribute to the project.
- Java
- Maven
- NodeJS
-
Install XCode
-
Download and Install Android Studio
-
Create a new system variable for
ANDROID_HOME
pointed to the Android SDK location -
Update the system path variable with
ANDROID_HOME\platform-tools
-
Install Appium 2.0 (You may refer to the official Appium documentation)
npm install -g appium
-
Install Appium Drivers
appium driver install uiautomator2
appium driver install xcuitest
Note: Environment Variables
-
Using IntelliJ IDEA
- Go to Maven Profiles
- Select
android
orios
Maven Profile as the platform - Select
dev
,qa
,uat
,pre-prod
orprod
as the environment - Select the test classes on the
src/test/java
folder - Right-click and click on
Run
-
Using Command Line
-
To run the smoke test suite in Android against the QA environment
mvn clean test -Pandroid,qa,smoke-test
-
To run the regression test suite in iOS against the UAT environment
mvn clean test -Pios,uat,regression-test
-
Note: By default, if no Maven profiles are selected, the tests will be executed on the android
platform and in the dev
environment.
Copyright 2024 MaxSoft.