Appium+Cucumber tests up&running on Buddybuild
You heard lately for the new product buddybuild, but you are not sure how to set it up. In this post, I will explain to you how to set up your Appium/Cucumber tests to run along with the new build.
What is buddybuild?
Buddybuild ties together and automates building, deploying and gathering feedback for mobile apps.
If you’re developing a mobile application and are looking for a mobile focused continuous integration, continuous deployment and iterative feedback solution that takes minutes to setup and get running, buddybuild is the right solution for you
It is CI in itself for mobile apps (hybrid and native), supporting any development framework. Using it, you do not need Jenkins and Hockey app anymore. Gives opportunities to avoid hassle with UDID for the ios folks, your tester and/or client can easily download the latest build directly from his e-mail, and start testing.
A tester can give instant feedback by taking a screenshot and marking an issue (s)he noticed.
How to set up buddybuild for test automation?
You can enable `AutoBuild` option that after each `git push` your branch starts the automatic build. Buddybuild seems to work seamlessly for making builds, and in their docs you can find info on how to set your project up within few steps. However, there is a lack of information on how to set your automated tests up&running. In this post, I will explain what you have to do in order to have your Appium and Cucumber tests automagically up and running on each build.
All the magic lays in two buddybuild files:
After you have triggered the new build, buddybuild opens automatically fresh box on their servers where your build is going to be generated. Buddybuild clones your bitbucket or GitHub project repository, checkout out the desired branch and then the build process starts. Assuming that developer has set up all needed to have a successful build (that should be done in the file buddybuild_postclone.sh), before the build, it will look for a file buddybuild_prebuild.sh, where you should list all of the prerequisites you must have installed in order to have your tests running. Basically, all you have to have locally installed on your computer you should list it in buddybuild scripts.
This is the list of commands for buddybuild_prebuild.sh:
When a build is successful it will not deliver it yet as successful. What happens after the build succeeds is that now buddybuild is looking for buddybuild_postbuild.sh file and executes every command listed in that script.
Postbuild script should contain, installation of :
As the buddybuild team still did not develop official support for Appium and Cucumber from the GUI (If that feature comes soon hopefully, should detect your tests, set up Appium server, execute Cucumber, parse out the generated report and display it on the dashboard).
Until that comes, optionally you can add command where you upload cucumber test results to your AWS bucket.
This is the list of commands for buddybuild_postbuild.sh:
You can find this two files in the GitHub repo:
Sharing is caring! Please hit that ❤ and share this article with anyone who might benefit from it.