In the last article — How to implement continuous deployment of Android applications, we used flow.ci + Github + fir. Im to implement continuous deployment of Android applications. For Android developers, they may use the Android emulator for automated testing throughout the process.

So, this time we started the Android emulator plug-in in flow.ci and added the connectedCheck command to the default script to build the plug-in to achieve automated testing and continuous integration of Android applications.

PS: If you’ve read the Android continuous Deployment guide, or if you already know the basics of flow.ci, skip to step 7 🙂

To understand the flow. Ci

Flow. ci is a continuous integration (CI) service integrated with workflow mechanism. It can also be understood as an automated process platform. Build the development test environment and start the first Build in 1 minute.

At Flow.ci, we refer to the development workflow of a project as a flow, and each flow consists of triggers and plug-ins. The system provides corresponding flow templates, triggers and plug-ins according to different languages and environments. Flow is easy to customize, just one-click to add the plugins you need. It could be a code static analysis detection tool (e.g. Eslint), a database (e.g. Mysql/MongoDB/Redis), a message notification plug-in (e.g. Mail /Slack), etc.

Focus more on the code and leave the rest to flow. Ci automation 🙂

Build Android automated testing and continuous integration

1. Create projects

2. Associated code repositories

3. Select the project to integrate

4. Start your first Flow

Select the project type Android and enable the default flow template, including Intialize – Git clone-cache-build flow.

5. Select the JDK version and click Create Project

In addition to Java for Android, Flow. ci provides a multi-language and multi-version development test environment for Node.js, Ruby, PHP and Python.

More languages will be supported later.

6. Click “+” to add plug-in and customize flow

7. Search for the Android Emulator plugin in the plugin list and select Add

8. Select the Android SDK version and Android CPU type



The default plug-in generation does not include test case execution commands, so you need to do simple custom scripts to run the tests properly.

9. Click + to add a custom script plug-in from the plug-in list.



Then, remove the Build plugin from the default Flow template.

In the custom script plug-in, add the “connectedCheck” command or your own gradle command (hint: green box). You can also rename the plug-in by clicking on the title bar to modify the text. Then, click Save.

10. Bingo! Your Flow is ready. Now commit the code to Build.

Once this automated process is implemented, all you need to do is develop new features and submit code. Diagrams run through automated testing and continuous integration processes, healthy project status.

Tedious tasks should be automated tools, which is the unremitting pursuit of programmers. If you also want to experience automated testing and continuous integration of Android apps, submit your application on the flow.ci homepage and the invitation code will be sent to your email.

Looking forward to your feedback.

Happy Building!

flow.ci team