When we use Travis CI or other continuous integration tools, we start looking at automation, notifications, and testing as part of our daily tasks. After a short period, you’ll surely start to wonder: “How did I survive without this process before?” 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 and screen sizes) and starts playing with it, looking for crashes and other common problems.
Moreover, the ability to know what is happening in the jungle of mobile hardware in terms of resource consumption and bottlenecks is crucial. Gathering this information early on in each development cycle helps us to avoid bad UX. That’s just one more benefit of adding Monkop CLI to your testing.
Setting Up Monkop for Travis
1. Enable Monkop’s API in your Add-ons section: https://console.monkop.com/addOns.xhtml
2. Add Monkop APIKey as a Travis-CI Variable in Repository Settings named monkopapikey:
3. 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:
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.
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 the OAuth Authentication Method
1. Enable github add-ons in the Monkop console and authorize to give Monkop these permissions:
2. You will be redirected to GitHub in order to authorize application:
3. 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.