The mabl blog: Testing in DevOps

3 Steps to Shift-Left Testing with Test Automation | mabl

Written by Bridget Hughes | Apr 8, 2021 2:41:11 PM

Whether you’re transitioning to intelligent test automation from purely manual testing or a legacy automated testing tool, the road to implementing quality engineering requires a thoughtful, strategic plan to engage the entire DevOps pipeline. After all, change can be a serious challenge for many people, even if they know the change is ultimately for the better. For quality professionals, encouraging test automation adoption is the first stage of transitioning to quality advisors as they work with engineering teams to shift testing left and start the quality process earlier in the SDLC. Managing the change is an essential part of successfully shifting to quality engineering while also accelerating product velocity. 

Adopting Shift-Left

As applications and websites become more complex, relegating testing to a single stage right before deployment is no longer feasible. It risks causing a delay if testing takes longer than expected, or if a particularly challenging defect is discovered. Instead, high-velocity teams are injecting more testing earlier in the SDLC, which reduces the chance that defects impact large parts of a new feature and reduces the amount of testing required right before deployment. Another incentive for shifting left to enable DevOps? Less stressful release days, which benefit the entire company. 

Identifying Opportunities for Test Automation

Since getting software developers engaged in manual end-to-end testing would be an impossible task, test automation is critical to building trust and reducing the burden of testing at every phase  in the pipeline. With effective test automation, engineers are able to trigger test suites with just the click of a button, which is far simpler to integrate into existing workflows. 

Let’s look at the DevOps pipeline: 

 

As you can see, test automation enables testing to occur at the earliest stages of development, including when an individual engineer is working on creating or updating product code. With fully implemented test automation, that engineer is able run a series of end-to-end tests in the background and run locally  every time they hit save. This catches defects at the earliest possible moment and saves significant time on remediating bugs later in the build process.

Later in the pipeline, automated testing streamlines API and UI smoke testing to check basic functionalities, unit testing to validate individual commits, and linting to eliminate basic coding errors. As quality engineering matures at your organization, more advanced test automation practices can include cross-browser testing, full regression suites, and feature-level tests in ephemeral environments. 

As you develop a plan to shift automated testing left, mapping out your organization’s development pipeline and identifying the easiest points to implement testing is critical to long-term success. 

Conquering the Learning Curve

Once specific steps for automated testing are identified, quality professionals need to establish a plan and timeline for onboarding new team members to their test automation solution. This can include:

  • Office hours: each week, QA team members can set aside a set window of time for engineers and product managers to ask questions about test automation. This provides 1:1 support for coworkers that are new to testing, as well encourages collaboration between quality professionals and their developer counterparts.
  • Self-paced learning resources: any effective test automation partner should have ample resources to guide self-paced learning. Ensuring that everyone, not just the quality engineering team, has access to these resources makes testing more democratic and easier for people to master test automation on their own schedule.  

Aligning Goals and Objectives

Typically, engineers are evaluated by output and time spent on various projects. Unfortunately, these criteria do not lend themselves to quality best practices. The good news is that test automation tackles this in two ways: by expediting testing and delivering data that helps inform a fuller picture of good coding practices. 

Working with product managers and engineering leadership, quality engineering can establish additional metrics that inform development practices and build an actionable roadmap to improving product quality throughout the SDLC. For early stage testing, shared goals can include test coverage, a minimum number of tests at each stage of development, and the number of bugs caught at each testing point. With shared objectives, developers and quality teams are able to begin their quality engineering efforts on the same page and break down the siloed workflows that hinder product velocity. 

It’s all about teamwork 

Quality engineering ultimately aligns the product team with the quality team to make long-term improvements in product quality and design. By adopting test automation, quality teams have the solutions they need to engage engineers in the testing process earlier and with less friction, making it easy to shift testing left.