Git Product home page Git Product logo

appium-sample-code's Introduction

Appium Sample Code

Introduction

This repo is a clone of https://github.com/appium/sample-code with whatever changes we need to make for it to work.

Original readme: This repository contains sample applications which are used mostly by appium functional tests.

iOS Testing (Files)

We're mostly interested in testing with node. Node tests can be found in sample-code/examples/node.

TestApp

This test depends on compiling the test app found at https://github.com/appium/ios-test-app. Build that sucker and be ready to change the path in apps.js, below, to its target's product.

helpers

The helpers directory holds a number of configuration files that are pulled into the test scripts.

  • appium-servers.js

    indicates where the appium server is found. We only run locally now.

    exports.local = {
      host: 'localhost',
      port: 4723
    };

    This expects you to have installed the appium server and to start it.

  • apps.js

    if (process.env.DEV) {
      // explicit path to build directory
      exports.iosTestApp = "/Users/jrgresh/Library/Developer/Xcode/DerivedData/TestApp-ezwhxykroqnrmvfcupialeyiajfy/Build/Products/Debug-iphonesimulator/TestApp.app";
    }

    Note: change the iosTestApp path to the full path to the compiled executable and define DEV in the environment:

    export DEV=1
  • caps.js

    The Webdriverio Capabilities.

    exports.ios = {
      browserName: '',
      'appium-version': '1.6',
      platformName: "iOS",
      platformVersion: "11.2",
      deviceName: "iPhone 6",
      // the app is inserted from apps.js in the test, e.g. ios-simple.js
      app: undefined, // will be set later
      automationName: "XCUITest"
    };

    Note, the app property will be overwritten in the test:

    var desired = _.clone(require("./helpers/caps").ios);
    desired.app = require("./helpers/apps").iosTestApp;

iOS Testing (Steps)

Be sure appium is correctly installed.

Appium Server

brew install node      # get node.js
npm install -g appium  # get appium
appium &               # start appium

Appium client

npm install mocha -g
cd sample-code/examples/node
npm install webdriverio
npm install wd         # get appium client

Run

export DEV=1
mocha ios-simple.js

appium-sample-code's People

Contributors

jlipps avatar tikhomirovsergey avatar faidy avatar bootstraponline avatar jonahss avatar imurchie avatar sebv avatar michaelbredman avatar kazucocoa avatar saikrishna321 avatar moizjv avatar mindheist avatar monkpit avatar jgresh avatar eridem avatar mrudulp avatar robertopegoraro avatar russellbradley avatar bryant1410 avatar arikon avatar srinivasantarget avatar tkalfigo avatar xixiaofinland avatar alakshmi1030 avatar marlonfan avatar serhatbolsu avatar vikramvi avatar whinstondj avatar miguelrincon avatar khanhdodang avatar

Watchers

James Cloos avatar Cube Whidden avatar Marc Dostie 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.