Giter Site home page Giter Site logo

wellavelino / cross-platform-appium-cucumber-test-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gricsi/cross-platform-appium-cucumber-test-example

0.0 2.0 0.0 260 KB

Example test setup with Appium + Cucumber for iOS and Android cross application.

Ruby 92.16% Gherkin 7.84%

cross-platform-appium-cucumber-test-example's Introduction

UI testing

Setup

Important: These instructions assume that you have Ruby 2.1 installed, preferably managed with either RVM or rbenv, and Homebrew.

  1. Install RubyMine โ€“ optional.
  2. Install Appium, either the Mac app or through Node (npm install -g appium).
  3. Install the Appium client: brew install node; npm install -g wd
  4. Clone this repository.
  5. Open project in Ruby Mine โ€“ or in your favourite text editor.
  6. Install bundler: gem install bundler
  7. Navigate to the repository folder and run bundle install.

Project Structure

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

Configuration

You should configure the appium.txt under the config/<platform>/ folder.

Environment variables

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

Running

Command Line

  1. Start the Appium server on a terminal: appium --port 5555.
  2. Run the test suite: cucumber.
  3. You can combine tags and feature files and so on. More information.

Rake

  1. Start the Appium server on a terminal: appium.
  2. 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]

Reporting

  • 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.

Locators (ids, names, etc..)

cross-platform-appium-cucumber-test-example's People

Contributors

gricsi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.