Using cucumber-jvm & Appium to automate app test. Build tools using Gradle
- Add gradle to system/user path
- Appium installed in local machine
- Connected device WARNING If using emulator make sure architecture emulator is arm.
- Make sure
adb
can be executed from anywhere - Create new folder in root project with name
apk_res
and put apk in there - Create
environment.properties
file containings these :
#device | for now only Android. set as Android
device = [Android/IOS]
platformName = [Android/IOS]
deviceName = [Device_name] | use command "adb devices" for android
#launching
apk_name = [apk_name_that_stored_in_folder_apk_res]
pkg_name = [pkg_name_here] | eg : com.test.cucumber
#credential
valid_mail = [valid_mail_here]
valid_pwd = [valid_pwd_here]
- Go to root project
- Run this command
gradle cucumber
In general we use cucumber feature_file_name:[line_number]
, in this project slightly different.
Use this instead gradle cucumber -PfeatureFile="feature_file_name:line_number"
See this link for more info about working with cucumber & gradle