Now is the era of shift-left testing. Little by little, modern development processes are tearing down the vestiges of the establishment. Gone are the days of waterfall, large and unruly design artifacts, and bloated change committees (well, almost). Processes move faster, deployments occur more quickly, and teams collaborate closer than ever before.
And it’s all because we’re shifting left.
It’s looking a lot less like a development process and more like a continuous lifecycle of quick feedback and iteration. There isn’t a definitive start and stop to each stage. We’re always learning and adjusting. impressive tooling like CI/CD allows operations teams to quickly push, pull, adjust, and shift. Everything is happening earlier and more often. Testing is no exception.
What is shift-left testing?
Shift-left is inspired by the agile methodology, which emphasizes early and often stakeholder feedback, rather than a big-bang approach that waits until later stages to collect feedback, test, and deploy.
We often think in terms of a linear development lifecycle, moving from left to right. As a result, testing is reserved for the end of the lifecycle. And what are the effects?
- Last-minute bug fixes: Since feedback and testing aren’t performed until the end of the development, the development team is swarmed with last-minute fixes, requests, and enhancements.
- Lackluster features: Since you haven’t collected feedback until the last minute, features just don’t hit the mark. Not only did you miss opportunities to iterate and improve, but you’ve also caught late-stage issues that you don’t have time to resolve.
- Entire timelines can come to a grinding halt: Worst-case scenario, there are so many issues and disagreements around the definitions of done, that the entire project comes to a stop.
- Late to market: You know the saying, if you’re not first you’re last! The faster you get to market, the better. In today’s world, the quicker you bring value, the better. The old paradigm is slow to start and even slower to finish.
Shift-left testing involves moving testing earlier into the process—hence, shifting left. And here’s where shift left testing is often misunderstood. It’s not enough to simply start testing earlier, you have to also test more during the entire lifecycle. This allows the development team to catch issues early before they become bigger issues, or to prevent them together instead of waiting until the very end.
Shift-left testing emphasizes preventing issues, rather than fixing them.
Why does DevOps recommend shift-left principles?
So, why does DevOps recommend shift-left testing? It’s simple: The linear approach turns testing into a bottleneck and the goal of shift left testing is to alleviate the bottleneck. So how do you fix a bottleneck?
Well, It turns out developing software isn’t all that different from running a manufacturing plant. Modern DevOps owes much of its theory to lean manufacturing. I won’t go into detail about the principles of lean manufacturing, but it provides a solution for bottlenecks. Here are the options it presents.
Manage work in progress
Value isn’t created unless it’s in production and nothing can go into production until it’s tested. Too much work in progress leads to waste. Shift-left testing helps manage WIP by starting testing earlier, which allows work in progress to be completed—and for more work to be released.
Never leave the bottleneck idle
If the bottleneck is sitting idle, no value is being produced. Shift-left testing moves the bottleneck so that it’s working at its capacity more often. Even while development is ongoing, work is being tested, and improved.
Process work in batches
Sprints, anyone? By organizing work into manageable and related batches, you can increase your overall throughput. For testing, it means less time ramping up testers because the scope of testing for each release is more manageable. This leads to quicker feedback and smoother testing.
Reduce the strain on the bottleneck
It’s all about making sure there isn’t a backup at the bottleneck. You can only ever release as much as the biggest constraint permits. Testing is often that constraint, so if you pile up a bunch of development work to be tested, you’re putting too much strain on the testing process. At best, it’ll take a long time for testers to finish, at worst it will cause a breakdown.
How to go about shift-left testing?
Many strategies can help you adopt a shift-left testing approach, but when it comes down to it, two important changes should be made: Better processes and technology:
Shift left with better processes
We can’t claim to be ready to adopt the shift-left testing approach if you’re not adopting agile principles in general. This means embracing early and often feedback, breaking down work into smaller, more manageable pieces, and prioritizing functioning features over documentation. Sound familiar? You might’ve read some of this before (see the famous Agile Manifesto).
This change will take more than a few emails and an update to your SOP. Adopting an agile approach is a process that never ends. It’s a—yes—paradigm shift. Don’t worry, though. Just like agile preaches, you can begin your journey little by little.
Shift left with better technology
We’ve left out a big part. It’s impossible to adopt true shift-left testing with traditional tools. You can’t live off of spreadsheets, unmanageable test scripts, and bloated testing plans. Your team should know what’s on its plate, so no time is wasted starting work that isn’t ready or waiting on work to walk in the door.
To manage work in progress, you need to make work in progress visible. This is usually done best by a tool like JIRA, where you can define work, assign work, and collaborate.
To alleviate the strain of the bottleneck, it’s best to automate your testing. You can’t move testing sooner if you’re stuck writing test scripts and manually running them. For example, Sofy’s no-code testing automation platform lets you create a test on a real device, automate it, and run it across hundreds of other devices. Its smart regression features catch gaps in your code before you do. When your code base changes, Sofy recommends and implements updates to your test scripts. (That’s why our clients are cutting their QA time by 90%.)
Shift-left testing requires early and often testing and releasing. You need to be ready to test as soon as a change is made. It’s advisable to also invest in a Continuous Integration/Continuous Delivery tool. These tools are integrated directly into your release pipeline so as soon as changes are done, they can be released. Sofy integrates with popular CI/CD tools so testing can also be built right into your pipeline, allowing you to stop waiting around.
Shift-left testing in action
Let’s play through an example scenario that emphasizes shift-left testing principles.
An organization has been working on enhancements to an existing restaurant rewards app. They want to use GPS so that users can find the nearest location with ease.
After grooming the backlog, stories are pulled into the first sprint, which will deliver a functioning MVP. The development team is assigned work. As they complete items, they’re continually checking in changes.
Using CI/CD, they quickly push to other environments where testing can begin. Since they’re using Sofy, the testing team can immediately begin recording tests on real devices and automating them. Once automated, the tests can be run as development continues. Since the new feature involves interacting with GPS, the company’s QA team performs tests on real devices using the Sofy Real Device Lab.
A few minor issues are found. Luckily, since testing was performed at earlier stages, they are turned around quickly. Sofy’s smart regression recommends changes to the test scripts based on code updates so there is no need to spend days reconfiguring code.
Moving forward
The principles of shift-left testing aren’t new. They owe their origins to agile, which draws inspiration from lean manufacturing. Shift-left testing can do wonders for organizations. It can increase delivery time, decrease cost, and maximize ROI. It requires more than just reorganizing the steps of your development process. To adopt shift-left testing is to embrace agile principles in addition to the technology that’s needed to put the principles into action.
Disclaimer: The views and opinions expressed above are those of the contributor and do not necessarily represent or reflect the official beliefs or positions of Sofy.