Being able to add mobile tests on real devices to your builds and auto-tag releases with test results sounds pretty nice, no?! Now you can! We are happy to have added support for Jenkins, giving our users a new way to improve continuous integration in only 3 simple steps.



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).



Prerequisites

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:

CURL: If you don’t have it, please install curl where Jenkins will run your build process. Enable the use of the API getting your APIKey on your Monkop account under the ‘Add-ons’ option https://console.monkop.com/addOns.xhtml 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. Check out Monkop CLI for help with creating different tests or running automation scripts.

Happy tuning!

