Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Introducing Monkop CLI

DZone's Guide to

Introducing Monkop CLI

Check out this article to gain some knowledge about Monkop CLI, a command-line tool for Android test automation.

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

Image title

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: static.monkop.com/setup/cli/monkop-cli.py

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

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 and is only available for the Android Platform.


Visit monkop.com to try Monkop CLI today!

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:
android app developer ,android application development ,android developer tips

Published at DZone with permission of Fabian Baptista. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}