Monkop CLI is a command-line tool that enables a new kind of automation in your build process, allowing you to run Monkop tests automatically in your development cycle (without disturbance). Monkop will test your mobile apps in different kinds of real devices while your team remains focused on others steps of your building process. All you need is a Monkop account and to follow these simple steps to enable your app to be tested.

Installing Monkop CLI

Monkop CLI is a Python (v2.7) script that handles all communication with Monkop’s API using your account (APIKey). Once you have it, just download the latest version here: monkop.com/cli





Command Line Interface Options

You can get help from the command-line tool by calling monkop-cli -h

> monkop-cli -h

Usage: monkop-cli.py -k apikey [-t time] [-w] [-a appfile] [-st type]

[-sf scriptfile] [-c callbackurl] [-e extradata]

[-s transaction] [-h]





General:

-k apikey Your API Key (https://console.monkop.com/apikey.xhtml)

-t time Test duration in minutes (per device)

-w Wait for completion

-n Don’t return error code on test errors (status_code

will be always 0)



Application:

-a appfile Public URL or local path to application file



Script:

-st type Type of script file. Valid values: ESPRESSO

-sf scriptfile Public URL or local path to script file



Notification:

-c callbackurl Public URL for notification purposes

-e extradata Extra data to be defined by customer, this data will be

returned in the notification callback



Status:

-s transaction Get transaction status



Help:

-h, –help Show this help message and exit





Run your first test

First you need your app ready, if you don’t have one, you still can test some 3rd-party app to see what happens:

> python monkop-cli.py -k YOURAPIKEY -w -a “http://static.monkop.com/setup/apps_demo/Google_IO_2016_4.4.6.apk”

Download and run in a single line with cUrl

> curl -sL monkop.com/cli | python - -k YOURAPIKEY -w -a “http://static.monkop.com/setup/apps_demo/Google_IO_2016_4.4.6.apk”

Prerequisites

Enable the use of the API Key on Add-ons:

https://console.monkop.com/addOns.xhtml

Python 2.7 installed (already installed on most Linux distros and Mac OS X)

https://www.python.org/download/releases/2.7/

If the build runs over Windows, you may need to install CURL, and to have the CURL binary on same path of monkop-cli.py or accessible in path environment variable: https://curl.haxx.se/download.html







Limitations

Monkop CLI for non-enterprise customers is only available for the Android Platform.