Behavior driven development (BDD) approach to write automation test scripts to test mobile applications using Java, Appium and Cucumber.
The project architecture uses the standard Cucumbers structure.
JavaMobileTesting
├── src
│ ├── test
│ ├── java/com/example/testautomation
│ ├── features
│ ├── pages
│ ├── steps
│ ├── support
│ ├── utils
│ ├── resources
│ ├── app
│ ├── configs
│ ├── reports
│ ├── screenshots
This project uses the design patterns from Google Java Style Guide.
-
Install Java using Official Documentation.
-
Install Gradle using Official Documentation
-
Review and setup the configuration in src/test/resources/configs:
appium.server=http://0.0.0.0:4723/wd/hub appium.timeout=30 appium.platformVersion=11 appium.deviceName=Pixel_3_API_30 appium.app=/src/test/resources/app/test-automation-tool.apk
-
Build Project
$ gradle build
-
Run Tests
$ gradle test -Dcucumber.options="-tags @tagname"
-
Install Appium Server using Official Documentation.
-
Run Appium Server (NPM Global):
appium
-
Install Android SDK using Official Documentation.
-
After created an emulator, can use the follow command to start:
$ emulator @emulator_name
-
List Devices
$ emulator -list-avds
-
Mapping the elements
$ uiautomatorviewer