Important: These instructions assume that you have Ruby 2.1 installed, preferably managed with either RVM or rbenv, and Homebrew.
- Install RubyMine – optional.
- Install Appium, either the Mac app or through Node (
npm install -g appium
). - Install the Appium client:
brew install node; npm install -g wd
- Clone this repository.
- Open project in Ruby Mine – or in your favourite text editor.
- Install bundler:
gem install bundler
- Navigate to the repository folder and run
bundle install
.
ui-testing
| config
| | android
| | | appium settings
| | ios
| | | appium settings
| | |
| features
| | pages
| | | android
| | | | page object
| | | ios
| | | | page object
| | | base page objects
| | step_definitions
| | support
| | feature files
| Gemfile and Rakefile
You should configure the appium.txt
under the config/<platform>/
folder.
You should define PLATFORM_NAME
with the value 'ios'
or 'android'
(depends on what you want to run):
-
In RubyMine's running configuration.
-
In the command line:
export PLATFORM_NAME=android
- Start the Appium server on a terminal:
appium --port 5555
. - Run the test suite:
cucumber
. - You can combine tags and feature files and so on. More information.
- Start the Appium server on a terminal:
appium
. - Run acceptance tests on the selected platform (ios|android) with selected tag:
- platfrom parameter is mandatory
- tag parameter is optional
rake run_acceptance[android,@tag_parameter]
or
You don't have to start the Appium server manually just use the single_run_acceptance rake command
rake single_run_acceptance[android,@tag_parameter]
or
Also a simple way to rerun failed cucumber scenarios automtically once - use the single_run_acceptance_with_retry rake command
rake single_run_acceptance_with_retry[android,@tag_parameter]
- In the command line:
cucumber --format html --out reports.html
or
cucumber --format html > features.html
- You can also export your tests result to an HTML file inside the RubyMine.
- You can use the Appium Inspector.