Automation project with Java + Gradle on Browser Stack (Device Farm) and GitHub Action (CI) doing the remote mobile test, GithubPages to deploy Allure Serve to see test results, PageObject/Screen and PageFactory as a structure.
Configuration:
- Java JDK 8 or 11
- Android SDK updated
- Android Emulator
- Appium Server
- Browser Stack Account and Keys
Running:
./gradlew test --tests "AppTest"
You can run with different devices like iOS and Android using properties when running this command line:
Android:
./gradlew test --tests "AppTest" -DMOBILE=ANDROID
iOS:
./gradlew test --tests "AppTest" -DMOBILE=iOS
We have 3 possibilities for execution the tests locally, remotely or via device farm, setting the variable RUN to, local, remote or farm.
local = execute locally on physical devices. remote = execute using variables from the GitHub Action, recommended for CI executions. farm = you can execute setting some variables on remote.json and execute from you own computer to a device farm.
Running on CI:
./gradlew test --tests "AppTest" -DMOBILE=android -DRUN=remote
Running locally:
./gradlew test --tests "AppTest" -DMOBILE=android -DRUN=local
Running on device farm:
./gradlew test --tests "AppTest" -DMOBILE=android -DRUN=farm
To build a report, and browse it use the following command:
./gradlew allureServe
Github Pages with Allure report results: ALLURE