iOS & Android UI Automated Tests using Appium & Cucumber
Install homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install node using homebrew:
brew install node
Install appium for command line:
npm install -g appium
Make sure you have Android Studio (and Android SDK) and Xcode installed
Install carthage (used for iOS):
brew install carthage
Use Appium Desktop to inspect the UI elements
Run the following commands to make sure you have the correct versions for:
Checkout the project
Download and install JDK 1.8.
Add the environment paths
If you don’t have a .bash_profile
file, you can create one by following these steps:
Add the following to the bash_profile:
export ANDROID_HOME={path to your android sdk}
export JAVA_HOME=/Library/Java/JavaVirtualMachines/{jdk version}/Contents/Home/
export PATH=${JAVA_HOME}/bin:$PATH
Import the project in IntelliJ IDEA (using import from external model Gradle) and do a Gradle sync
Install Cucumber for Java plugin
Cucumber for Java
and click installDuplicate all .properties files from /src/test/resources/config/ into /src/test/resources/config/local/ and update the new files with the values specific to your machine (usually the same way you’ve set up Appium UI app).
Run tests
PLATFORM
key in the global.properties should be added (Android or iOS)NOTE In case you encounter connection problems with the Appium server, you should update rvm to the last version:
`rvm get head`
If you encounter any errors, you can use the appium doctor:
npm install -g appium-doctor
appium-doctor --[android/ios]
Some tests do not work when the keyboard is visible. You may need to disable the software keyboard on your emulator, by using:
adb shell settings put secure show_ime_with_hard_keyboard 0
AcquaintNativeiOS.app
since the UITableView (the list) has many entries.AcquaintNativeiOS-shortlist.app
to see the difference in impact.