πŸ“± Automation for iOS and Android Apps.
ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Ρƒ
Jonathan Lipps 398904be31 initial work on listing web frames/windows via remote debugger 2013-02-01 16:39:16 -08:00
app initial work on listing web frames/windows via remote debugger 2013-02-01 16:39:16 -08:00
assets add app zip files for use in tests 2013-01-25 14:54:57 -08:00
instruments initial work on listing web frames/windows via remote debugger 2013-02-01 16:39:16 -08:00
sample-code give sauce example test a name 2013-01-31 13:59:14 -08:00
test playing around with remote debugger for automating webviews 2013-01-31 20:09:19 -08:00
.gitignore allow winston to log to file by starting server with --log 2013-01-29 15:20:24 -08:00
.jshintrc That setting gives other, unhelpful errors 2013-01-15 11:43:08 -08:00
.travis.yml Added .travis.yml 2013-01-14 12:02:03 -08:00
AUTHORS add self to authors, fix spelling 2013-01-23 07:55:15 -08:00
README.md make grunt buildApp handle more SDKs, update readme 2013-02-01 16:08:35 -08:00
RELEASE.pdf Copying over release of rights from Zoosk for ios automation code used in Appium 2013-01-21 17:01:08 -08:00
grunt-helpers.js make grunt buildApp handle more SDKs, update readme 2013-02-01 16:08:35 -08:00
grunt.js make grunt buildApp handle more SDKs, update readme 2013-02-01 16:08:35 -08:00
logger.js ability to warp time and visit the future 2013-01-30 15:54:44 -08:00
middleware.js create middleware file to make things clean 2013-01-29 11:01:31 -08:00
package.json Bumping version to publish 2013-02-01 14:23:05 -08:00
server.js ability to warp time and visit the future 2013-01-30 15:54:44 -08:00
warp.js ability to warp time and visit the future 2013-01-30 15:54:44 -08:00

README.md

Appium

Build Status

Appium is a test automation tool for native and hybrid mobile apps. It supports iOS today and Android support is in the works. Appium drives Apple's UIAutomation library using Selenium's WebDriver JSON wire protocol. Appium is based on Dan Cuellar's work on iOS Auto.

Testing with Appium has two big benefits:

  1. You don't have to recompile your app or modify it in any way because Appium's automation is based on Apple's UIAutomation library.

  2. You can write tests with your favorite dev tools using Java, JavaScript, PHP, Python, Ruby, C#, or Perl with the Selenium WebDriver API and language-specific client libraries. If you use the UIAutomation library without Appium you can only write tests using JavaScript and you can only run tests through the Instruments application.

Requirements

> Mac OS X 10.6 or higher
> XCode
> Apple Developer Tools (iPhone simulator, command line tools)

Ninja-Speed Setup for Expert Users

Install node.js (includes npm, the node.js package manager).

> sudo npm install appium -g
> appium &
> node your-appium-test.js

See the Appium example tests.


Prerequisites

Install node.js (includes npm, the node.js package manager).

From your local repo clone's command prompt, install these packages using the following commands:

> sudo npm install -g mocha
> sudo npm install -g grunt
> npm install

The first two commands install test and build tools (sudo may not be necessary if you installed node.js via Homebrew). The third command installs all app dependencies.

To avoid a security dialog that may appear when launching your iOS apps you'll have to modify your /etc/authorization file in one of two ways:

  1. Manually modify the element following <allow-root> under <key>system.privilege.taskport</key> in your /etc/authorization file to <true/>.

  2. Run the following grunt command which automatically modifies your /etc/authorization file for you:

    sudo grunt authorize

Important Note: Making this modification to your /etc/authorization file grants access privileges to all members belonging to your _developer group.

Quick Start

Download UICatalog:

> grunt downloadApp

Build an app (if the functional tests fail, try running these grunt commands again):

> grunt buildApp:UICatalog
> grunt buildApp:TestApp

Run all functional tests:

> grunt functional

Run unit tests:

> grunt unit

Run all tests:

> grunt test

Before committing code, please run grunt to execute some basic tests and check your changes against code quality standards:

> grunt
Running "lint:all" (lint) task
Lint free.

Done, without errors.

More Stuff and Some Low-Level Tips

By default, grunt buildApp builds apps using the iPhone 6.1 simulator SDK. You can overwrite the simulator by passing another SDK to grunt (to figure out which SDKs you have available, try xcodebuild -showsdks:

> grunt buildApp:UICatalog:iphonesimulator6.0

If you want to run the Appium server and have it listen indefinitely, you can execute one of the following commands to start an Appium server with or without a specified app:

> grunt appium           // launch Appium server without app
> grunt appium:TestApp   // launch Appium server with the TestApp
> grunt appium:UICatalog // launch Appium server with the UICatalog app

Then you can run individual test files using Mocha, for example:

> mocha -t 60000 -R spec test/functional/testapp/simple.js

Do you like getting close to the metal? Or are you trying to launch an Appium server from a script with a custom app? If so you can start Appium without grunt from the command line with an app or without an app. (See parser.js for more CLI arguments.)

> node server.js -V 1  // launch Appium server without app
> node server.js --app /absolute/path/to/app -V 1  // launch Appium server with app
> node server.js --launch 1 // pre-launch the app when appium loads
> node server.js --log /my/appium.log // log to file instead of stdout
> node server.js --warp 1 // use unsupported system-crashing speedup tech

In this case, the app has to be compiled for the iPhone simulator, for example by executing the following command in the Xcode project:

> xcodebuild -sdk iphonesimulator6.0

This creates a build/Release-iphonesimulator directory in your Xcode project that contains the .app package that you'll need to communicate with the Appium server.

Using with a Bitbeambot

AWAITING THE FUTURE

Contributing

Fork the project, make a change, and send a pull request!

Mailing List

Discussion Group