GithubHelp home page GithubHelp logo

irfanahmadin / appium-mobile-grid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from isonic1/appium-mobile-grid

0.0 1.0 0.0 30.14 MB

Appium Mobile Grid Example for iOS, Android and More

Ruby 53.17% Objective-C 43.62% Makefile 3.21%

appium-mobile-grid's Introduction

Appium Mobile Grid Example

Getting Started

Assumptions:

  • You have AndroidStudios and Xcode installed.
  • You have Xcode command line tools installed.
  • You have npm & Appium installed. https://www.npmjs.com/package/appium
  • You followed the Appium setup instructions http://appium.io/slate/en/1.5/?ruby#setup for android & iOS.
  • You're running this on a Mac for iOS. For android, you can run on Windows and Linux with some tweaking.
  • You have Homebrew installed. http://brew.sh/
  • You have ideviceinstaller installed for iOS tests. brew install ideviceinstaller
  • You have enabled UI Automation in Settings > Developer for iOS.
  • You have android emulators installed or USB connected devices with USB Debug enabled.

To set up:

  • Ensure you running at least Ruby version 2.0 or above. You can check this by running:

    ruby -v

    If you have an older version of Ruby installed, consider using rbenv for installing a newer version of Ruby.

  • Install Bundler:

    gem install bundler

  • Run bundle install:

    bundle install

  • Install Allure Report: https://github.com/allure-framework/allure-cli

    brew tap allure-framework/allure

    brew install allure-cli

Running Specs

  • Start android emulators or connect devices!
  • iOS is setup to only run on real devices. This is due to Apple's limitation of allowing only one running emulator per machine.

To run specs single threaded:

rake android[single] rake ios[single]

To run specs in parallel:

rake android[parallel] rake ios[parallel]

To run specs distributed:

rake android[dist] rake ios[dist]

To run specs on SauceLabs:

  • Goto saucelabs.com and signup.
  • Then add your SauceLabs environment variables.

export SAUCE_USERNAME=<user sauce user_id>

export SAUCE_ACCESS_KEY=<your sauce access key>

rake android/ios[single,sauce] <- "Will run tests tagged with :sauce single threaded"

rake android/ios[dist,sauce] <- "Will run tests tagged with :sauce distributed"

Generate Allure report: (Displays test results, hub log, appium log, screenshots and video)

allure generate report output/allure/*

allure report open

iOS debugging:

  • There could be times when the tests hang on iOS. This is most likely due to a pairing issue with ideviceinstaller.

idevicepair -u <udid> unpair

idevicepair -u <udid> pair

  • Accept the "Trust this computer" popup on the device.

idevicepair -u <udid> validate

  • Make sure you get "SUCCESS: Validated pairing with device "
  • You should now be able to install the app manually.

ideviceinstaller -u <udid> -i ./appium-mobile-grid/ios/TestApp/build/Release-iphoneos/TestApp.app.zip

  • Build the app with xcodebuild

cd ios/TestApp

xcodebuild -sdk iphoneos <- This will place a new binary in appium-mobile-grid/ios/TestApp/build/Release-iphoneos

ideviceinstaller -u <udid> -i ./appium-mobile-grid/ios/TestApp/build/Release-iphoneos/TestApp.app

Capture Metadata

$ gem install flick

  • See here for more details.
  • Also see here for example of implementation.

Disclaimer:

  • This example was built quickly, so the code is not in the optimal state of dryness.
  • No page objects were used. The tests are soley for example purposes.

appium-mobile-grid's People

Contributors

isonic1 avatar

Watchers

 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.