Table of contents
- Getting Started
1- Create your account
2- Upload your app to Monkop
Upload your .ipa (iOS App) or .apk (Android App) and Monkop will test it for you. In less than 24 hrs you will receive a detailed report in your inbox!
Ad Hoc mode for iOS apps
For IOS apps you need to export your app in ad hoc mode before uploading it to Monkop. The following steps will help you accomplish this task:
1) Archiving Your App
Create an archive of your app. Xcode stores this archive in the Archives organizer. Choose Product > Archive. The Archives organizer appears and displays the new archive.
2) Exporting Your App to IPA
To create an iOS App file for testing, select the archive in the Archives organizer.
Click the Export button, and select “Ad Hoc”. The app will be code signed with the distribution certificate.
Click the Next button until the process finishes.
In the dialog that appears, review the app, its entitlements, and the provisioning profile. The ad hoc provisioning profile should contain the text: “Ad Hoc”.
Click the Export button and export the ipa file.
Understanding Monkop Report
Every time you run a test, a new report is created. After that, Monkop emails you including the report link address. Here is a brief guide to understand the report sections and how to navigate it.
This section explains how to understand Monkop report after each execution (test-ride). This is how it looks like:
The report is a web page, so it can be accessible from any browser. It contains a left navigation panel and dashboard overview.
Navigation Panel: The left menu contains all sections and highlighted warnings and cautions. This panel enables users to navigate across:
- Dashboard: Contains market stats and selected devices
- Executions: The most important section, containing each device information like OS version, screen and hardware details, and also execution-related information such as: videos, screenshots, installation process, timing measures, resources and logs.
- Information: General information about the application under test, such as: version, compatibility, permissions requested, activities and included libraries.
- Correctness, Performance, Resource usage, security and power sections: each section containing analyzed behavior over all devices. Yellow / red indicators are values out of Monkop’s default thresholds, which are based on Google best practices and important market researches.
- Errors: Contains crashes reports, and logs when app is not responding (ANR).
This section contains a market chart, execution details, device selection segment (by screen density) and test-run information.
The following chart shows the latest Android market stats based on data collected by Google.
This is the most important section, since it has each device-specific execution. It shows executions that user has manually selected, or those one that Monkop has automatically selected for him.
Clicking on any device, users will find device specific information about execution:
Below this information users will find all details about device performance, videos, screenshots and logs.
You can also download a more detailed pdf guide here.
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
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]
-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)
-a appfile Public URL or local path to application file
-st type Type of script file. Valid values: ESPRESSO
-sf scriptfile Public URL or local path to script file
-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
-s transaction Get transaction status
-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”
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
Monkop CLI for non-enterprise customers is only available for the Android Platform.
Performance Profiling with Espresso
Monkop also supports instrumentation frameworks like Espresso. This allows you to test and profile their apps on all Android OS versions and top device brands by attaching Espresso scripts and waiting for the test execution in our device-lab.
To use Espresso scripts on Monkop, follow these simple steps:
1) Sign in and upload your app
2) Upload your Espresso scripts using option #2 of the image below:
3) Wait for the results in your inbox.
When we use Continuous Integration tools, we start looking at automation, notifications and testing as part of our daily tasks. Basically devs love CI tools because they can sleep better at night eliminating hassles often caused by long integration cycles: broken builds, manual merging hell and regressions in a huge fragmented world. Adding Monkop CLI after your build process will provide your team a dedicated bot that automatically installs your app on all relevant real devices (including different OS versions / screen sizes) and starts playing with it, looking for crashes and other common problems.
With this Jenkins integration you will be able to add mobile tests on real devices to your builds and auto-tag releases with test results.
Setting up Monkop for Jenkins
1.- Create a new freestyle job:
2.- Create a command line build step.
- Linux: “Execute shell”
- Windows: “Execute Windows batch command”
setting the following commands inside:
Windows: > curl -sL monkop.com/cli | python - -k %monkopapikey% -a “path_to_build.apk”
Linux/Mac OS X: > curl -sL monkop.com/cli | python - -k $monkopapikey -a “path_to_build.apk”
3.- Consider setting monkopapikey as an environment variable using EnvInject Plugin and injecting the variable as a password in your job
Note: Environment variables can be accessed using the syntax $monkopapikey (Linux/Mac OS X) or %monkopapikey% (Windows).
Monkop CLI uses Python + CURL to use Monkop’s API in order to run tests, show results and also update build status (if needed). So the prerequisites are:
1- CURL: If you don’t have it, please install curl where Jenkins will run your build process.
2- Enable the use of the API getting your APIKey on your Monkop account under the ‘Add-ons’ option https://console.monkop.com/addOns.xhtml
3- Python 2.7 installed (installed by default on Mac OS X and most Linux distros) https://www.python.org/download/releases/2.7/
Adding Monkop tests to your Jenkins pipeline will let your team automatically get key information on each build regarding how your app behaves on real devices while evaluating mobile-side performance.
Setting Up Monkop for Travis
- Enable Monkop’s API in your Add-ons section: https://console.monkop.com/addOns.xhtml
- Add Monkop APIKey as a Travis-CI Variable in Repository Settings named monkopapikey:
- Update your travis file .travis.yml We recommend using Monkop-cli in the after_success section, but each DevOp designs his or her own pipeline:
> curl -sL monkop.com/cli | python - -k $monkopapikey -a “path_to_build.apk”
> Sample .travis.yml
android: components: - build-tools-19.0.0
- curl -sL monkop.com/cli | python - -k $monkopapikey -a “path_to_build.apk”
Note: According to travis-ci documentation, if Monkop-cli is invoked from a script step, any failure of the apk processing will make your travis build fail. On the other hand, if you set up Monkop-cli on after_success or after_script step, your Monkop tests will never affect your build result.
Version Control and SCM
Pull request integration for GitHub
Monkop has a bot that contributes to your build steps and documentation with test results by automatically tagging / commenting on your pull requests inside your GitHub repository. All you need to do is give access to Monkop inside your GitHub account.
Using OAuth authentication method:
- Enable github add-ons in the Monkop console and authorize to give Monkop these permissions:
- You will be redirected to GitHub in order to authorize application:
- Then you will see your GitHub account info inside Monkop’s console:
Now all pull-requests in GitHub can be tagged by Monkop
To revoke Monkop privileges, click the revoke access button in GitHub add-ons section in the Monkop console. This will redirect you to GitHub settings so you can revoke access anytime:
As a result you will be adding Monkop to your pipeline, enabling your team to have each build under test using real devices, tagged and documented with just a few steps, running smoke / sanity tests, evaluating mobile side performance or running even more complex tests.