Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appium_rspec_setup

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appium_rspec_setup

  • 0.1.5
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Appium RSpec Setup

Appium Rspec Setup provides a quick way to include both Rspec as a framework to define your tests against and an Appium-compatible library to let it reach through and drive the virtual device of your choice.

Setup and Installation

This gem only sets up Rspec for use with Appium on your app. In addition to this gem, you will need to have installed and set up the Appium application available here: http://appium.io/

Create a GemFile in your app's main directory and add the following line:

gem 'appium_rspec_setup'

Run bundle.

Android

From the command-line, navigate to the main directory for your app and run the following command:

setup_android

When prompted, enter your app's name and the platform (Android).

iOS

From the command-line, navigate to the main directory for your app and run the following command:

setup_ios

When prompted, enter your app's name.


The setup process should complete within a few seconds, adding the following files to your app's main directory:

  • app_config.yml
  • spec/spec_helper.rb

Do NOT delete these files.

Usage

Add test files within your spec/ folder

Run tests from the command-line with the rspec command.

Below is a sample file login_spec.rb for an Android app:

describe 'App Login' do
  before(:all) do
    Appium::Driver.new(desired_caps).start_driver
    Appium.promote_appium_methods RSpec::Core::ExampleGroup
  end

  after(:all) do
    driver_quit
  end

  describe 'user login' do
    it 'should have two text fields' do
      expect(id('login_email_address').nil?).to eq false
      expect(id('login_password').nil?).to eq false
    end

    it 'should have a button' do
      expect(id('login_button').nil?).to eq false
    end

    it 'should go to splash screen' do
        id('login_email_address').send_keys('email')
        id('login_password').send_keys('password')
        id('login_button').click
        expect(id('splash_layout').nil?).to eq false
    end
  end
end

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 23 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc