-
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:
npm -v
node -v
appium -v
rvm -v
(Only if you use rvm)
-
Checkout the project
-
Download and install JDK 1.8.
-
Add the environment paths
-
Type defaults write com.apple.finder AppleShowAllFiles YES in terminal to view hidden files
-
Alt+Right click on finder and click relaunch to activate changes
-
Navigate to your user's directory
-
If you don't have a
.bash_profile
file, you can create one by following these steps:- Start up Terminal
- Type cd ~/ to go to your home folder
- Type touch .bash_profile to create your new file.
- Edit .bash_profile with your favorite editor (or you can just type open -e .bash_profile to open it in TextEdit.
-
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
- From the menu, select IntelliJ IDEA -> Preferences
- Go to Plugins
- Click Install JetBrains plugins
- Select
Cucumber for Java
and click install - You will have to restart IntelliJ
-
Duplicate 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
- Right-click on a test class/feature file and select Run
- Use the appropriate value for the
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
- On iOS due to the way we're querying the list of acquaintances you will notice performance issues when using
AcquaintNativeiOS.app
since the UITableView (the list) has many entries. This is by design - meant to highlight performance considerations. Feel free to point toAcquaintNativeiOS-shortlist.app
to see the difference in impact.
- Appium
- Appium Discussion Group
- Appium Java Client
- Appium Pro (will introduce you to all kinds of interesting and useful things you didn't know about Appium)
- How to Pick the Right Locator Strategy
- iOS Most Effective Lookup Strategy
- Cucumber Blog
- Fortech Internal Training - Mobile Automated Tests Presentation
- The Cucumber Book: Behaviour-Driven Development for Testers and Developers - Great resource for writing well structured Cucumber / Specflow tests (Specflow is just a .NET implementation of Cucumber)