In the fast-moving world today, no one has the patience to wait for months and years to get a new mobile app or softwares. Gone are the days when developers took a long time to develop a software program or app. With the rise in the technologies and tools, software development and application building has taken a new direction. Companies are now focused on catering to the millions of consumers who have turned to their smartphones to perform some of their day to day tasks. The boon of social media and networking applications have made it possible for people to connect with anyone and everyone from anywhere. eCommerce is another field that has changed the way we shop, look for groceries, etc. Overall the mobile app industry has made it easy to do lives in a much faster and efficient way. The app industry thrives on speed and agility, And one of the ways in which apps are being built fast and released is because of practice of DevOps and other strategies in app development firms.
What is DevOps?
Many app development firms and companies are already familiar with the term – “DevOps”. In simple language, it is the coming together of the Development and Operations teams in an organization to speed up the release of apps and updates. Be it for mobile, tablets or web-based computer systems, organizations are implementing DevOps practices to automate and speed up the release cycle of apps and updates. Before we define what DevOps is, we need to understand what it is not so that we arrive at its true definition. DevOps is not a tool, it is not a technology or software, it is not even a programming language that people can take a course on or acquire knowledge about from technical books.
DevOps is a philosophy, it is a mindset and a cultural shift that organizations are adopting in order to speed up timelines of app releases in the market. App development firms have realized that in order to stand out in the market one needs to deliver fast in a highly competitive app world. DevOps was implemented to bridge the gap between the development and operations teams to address the bottlenecks that stand in the way. One of the major reasons for the delay in releases was that teams worked in silos, however, adopting the practice of DevOps has brought teams to work together, and oftentimes even enabled team-members to swap tasks with each other to meet the requirements of customers. It literally means uniting the Development & Operations teams, processes, and technology to gain the ability to respond better to customer needs, increase confidence in the applications they build, and achieve business goals faster.
What is a DevOps Pipeline?
DevOps pipeline is a set of practices, tools & technology that Development and Operations teams implement to build, test and deploy mobile apps faster and easier. The primary focus of the pipeline is to keep the software development process lean, organized, and focused.
In the software development lifecycle, the developers write the code for their mobile applications and ensure that it does not bring any regressions or crash in the application. This process involves different stages of testing practices to find the defects. Post that the mobile applications are deployed/released. This whole journey of Build, Test & Deploy is what we attribute to DevOps Pipeline. Continuous Integration (CI), Continuous Delivery (CD), Continuous Development & Continuous Testing are the different components that constitute a DevOps Pipeline.
Understanding CI/CD Pipeline in DevOps
There are two ways to create the pipeline, users can create different Jenkins jobs for their needs and interlink those jobs to run one after the other, after getting a successful execution. This is the traditional way of creating a pipeline. On the other hand, one can create a job and insert or append the pipeline as per the requirement of the project. The disadvantage of this approach is that all these jobs will be available on CI tools. If one has to move from this tool to another or make a copy for another pipeline, it will be difficult. To address this issue and bring modularity, the second approach of creating a pipeline using the groovy script is getting popular. The biggest advantage of this approach is that a user can create a simple script of these jobs and can keep these groovy scripts in the repository. DevOps engineers can then create or copy multiple pipelines by simply creating one single job on CI tool and fetch the groovy script from the repository.
Using simple illustrations, we have shown below both the approaches.
In this example we have considered a small pipeline flow.
Build Android mobile app -> Upload the apk file to pCloudy-> Run smoke tests on mobile devices-> Run regression tests on mobile devices
The implementation stack:
- Github as a version control
- Jenkins as a CI tool
- pCloudy as a Test tool to run the automation on REAL Mobile devices
The Android mobile app code is fetched from github
It gets built on the build machine using Gradle
After a successful building of the app, the artifacts like .apk files will be stored in build folders
After successful app building, the android application (.apk) file needs to be uploaded to pCloudy’s cloud location
Check if the same name application is available on the cloud location.
If the app is present then delete that app & upload the new app.
If the app is not present already then upload the new app.
After successfully uploading the app to the cloud drive, fetch the smoke test code from github to execute the smoke test on multiple mobile devices
After successful execution, run the regression test suite on multiple mobile devices
Here is a view of the pipeline from Jenkins
Similarly we can use the groovy script to reduce the manual efforts of creating multiple jobs on different platforms, or toolsets. Once the script is written, the same can be used with any CI tool by simply creating a single job or fetching the same details from a repository in the CI tool.
Understanding the practical aspects of creating DevOps Pipelines help organizations to implement better workflows for improved test execution. Testing communities have seen a stark improvement in the release cycles from the implementing DevOps pipelines and automation. Implementing DevOps in organizations that are involved in App development is surely going to benefit in a big way. While the progress we are witnessing seems to put us on the fast lane of progress, the best is yet to come. We have attached another helpful whitepaper that covers the practical aspects of Mobile DevOps in-depth, you can use the link below to download your free copy and to gain more knowledgeable insights about the same. Happy Testing!