Rizwan Hafeez, Managing Director IT, Blue Cross Blue Shield Association
Some of the leading tech companies such as Facebook, Google, and Uber to name a few, already have well established automated CI/CD pipelines that go from inception to production quickly. These companies are releasing software multiple times daily in production. That could be only done because of the DevOps automation pipeline. QA plays an extremely critical role in that process.
There have been a lot of definitions for DevOps and terms are often used interchangeably. Let’s make sure that we are on the same page when discussing DevOps.
DevOps is not a role, person, team or a tool. DevOps is a combination of Development (DEV+QA) and Operations (OPS) teams that aims to develop software in a shorter cycle while delivering features with frequent updates having Quality in mind. Measurement at every step of the process along with Collaboration and Automation are the pillars for DevOps. Those pillars ensure that everyone is on the same page as the metrics are shared across the organization. The DevOps practices continuously loop around the integration and deployment rapidly. (MASQC)
DevOps principle demands strong interdepartmental communication. In mature DevOps organization, Dev team typically implements Test Driven Development (TDD), whereas QA focuses on Application Test Automation (ATA) and the Ops team focuses on testing the infrastructure changes before deploying to production. Everyone focuses on testing before deployment with a common goal of automating those testing activities that could be readily available for CI/ CD Pipeline.
Today, technology landscape is changing rapidly, filled with cloud and IoT devices; therefore customer expects a constant flow of updates that could be possible with seamless deployments. From microservices to mobile apps and with a variation of cloud deployments, many moving parts are required for these services. The pipeline essentially keeps the updates flowing with the help of Continuous Integration (CI) and Continuous Delivery/Deployment (CD). When the CI and CD is in place then the deployable unit is called a Pipeline.
Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. By integrating regularly, you can detect errors quickly, and locate them more easily.
DevOps is a combination of Development (DEV+QA) and Operations (OPS) teams that aims to develop software in a shorter cycle while delivering features with frequent updates having Quality in mind
Continuous Delivery (CD) is the natural extension of Continuous Integration: an approach in which teams ensure that every change to the system is releasable with the help of test automation and that we can release any version at the push of a button. Continuous Delivery aims to make releases boring, so we can deliver frequently and get fast feedback on what customers need.
Best Practices for a Pipeline
First, use common code repository among all teams is essential along with good orchestration tool. Orchestration essentially serves as a central pipeline that invokes each team’s automated processes/jobs. Next, configure triggers which alert via SMS or email for those processes/jobs from the pipeline such as Build, Automated Tests, Creating Images and Pushing Deployments. Lastly, it’s common to set up an enterprise monitoring tool at each step of the automation to measure the progress within the pipeline.
QA Role within DevOps
As discussed, one of the fundamentals for DevOps is Automation and QA plays a significant role in Application Test Automation (ATA) for the success of DevOps Pipeline. Another pillar is the Quality which QA embeds in the automated scripts for the delivery pipeline to ensure all builds have satisfactory quality products.
QA aims to have release-ready code deployed to production via the DevOps pipeline in a continuous loop. And it’s essential to have a robust Framework for your ATA. Sometimes entire build fails because of automated script failures and not the application failures itself. When automated script fails, the entire DevOps pipeline halts.
To avoid these false positives with scripts, a strong ATA Framework is needed for the success of CI and CD Pipeline. On the flip side, when you have a strong ATA Framework and it fails then those typically are defects. Strong ATA Framework ensures to find maximum defects internally without escaping into production.
Steps to start in QA
It is always good to start small. Pick the right tool. Design aTest Automation Framework that suites your organization needs and which could be invoked via batch. Automate a Smoke Test Suite covering high-level major functionality and then ensure it’s available to be executed on demand via orchestration tool. When you can execute successfully via orchestration tool, then extend those Jobs to Dev team. Then Dev Team can use this as a dependency before they check-in to the code repository to ensure the code is being validated.
Next would be to automate regression suites for your applications. After the completion of the sprint, ensure to convert functional automated scripts into regression automated scripts and always invoke via orchestration tool. Because within the DevOps organization pipeline is always accessible to everyone, so Dev team can leverage regression suites that are maintained by the QA team. Some mature organizations choose to use Behavior Driven Development (BDD) in combination of Hybrid Automation Framework.
Skills required for DevOps QA
Specific skills are needed to be a sound test automation engineer to support DevOps such as analytical, automation tools experience with good understanding of programming languages, ability to build frameworks (discussed above), understanding of orchestration to support CI. Understanding of Containerization is not necessary but certainly be a plus.
Per 2018 DevOps Survey Report “As organizations are starting to achieve traction with DevOps, 44 percent of highly evolved organizations reported that they always use repeatable testing patterns compared to less than 1 percent of the least-evolved organizations. That makes highly evolved organizations 44 times more likely to use repeatable testing patterns.”
Test Automation is an integral component for the success of DevOps. Failed test cases stop the CI/CD Pipeline. So it’s critical to have the right test automation tool with an appropriate framework, which is available to the CI/ CD Pipeline, with exact reporting mechanisms so that the delivery could be successful.