GithubHelp home page GithubHelp logo

oraziocw / android-test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blinkboxbooks/android-test

0.0 2.0 0.0 95.87 MB

Cucumber and Calabash tests for the blinkbox Books Android app.

License: MIT License

Ruby 98.13% Shell 1.87%

android-test's Introduction

android-test

android native app acceptance tests

Please read the Wiki to get started.

setup

  • Confirm location and password/username combination of debug.keystore calabash_settings
  • Confirm endpoint and project configurations in project_settings

Four settings files in config/

cucumber.yml -> cucumber profiles
test_data.yml -> test data
project_settings.yml -> controls the resource location
test_settings.yml -> controls test specific settings e.g. URL endpoints

Dynamic configuration

Within test_settings.yml the environment will select which APK to install and use. There must be the appropriate authentication path to match chose configuration

test:
 environment: "production-debug"
 
environment:
 "production-debug":
  url:
   auth: https://auth.blinkboxbooks.com
  qa:
   host: https://api.blinkboxbooks.com/service

usage

Typical usage

bundle install
rake 
rake calabash:run

Custom features

bundle install
rake 
rake calabash:run feature=features/login.feature

Custom profiles

bundle install
rake 
rake calabash:run profile=smoke

project structure

config/
	  test_settings.yml
	  project_settings.yml
	  test_data.yml
	  cucumber.yml
features/
		step_definitions/
		support/
				modules/
		pages/
		      model/
		Rakefile #rake -T for options
		README.md
		Gemfile

rake -T

rake android:get_latest_apk         # Get latest android APK
rake android:install_apk[apk_file]  # Installs the apk and test server (will reinstall if in...
rake android:resign[apk_file]       # builds and resigns the apk
rake calabash:environment_install   # Checks development environment and install essentials
rake calabash:run_config            # Prints out details about current configuration
rake calabash:console[apk_file]     # Run calabash-android console with included Calabash::A...
rake calabash:run[apk_file]         # Runs calabash android

Execution control variables

There're a few environment variables built into the calabash source code or introduced by us, which are used to control the calabash behaviour during execution. Please refer to Calabash documentation

Note: Calabash will always re-install the app once for every feature file - we can change it in the app_installation_hooks.rb

  • REINSTALL_BETWEEN_SCENARIOS (custom var) - if set to "1", Calabash will re-install the app between scenarios
  • SCREENSHOT_VIA_USB - if set to "true", Calabash will take screenshots from a connected device via USB. Reliable option if you connect device with a cable.

Cucumber tagging convention

Please refer to common convention in confluence

  • @clear_app_data - clear_app_data before the tagged scenario NOTE: right now we do clear_app_data before every scenario

android-test's People

Contributors

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