If you work in the software industry, you’ve most likely heard about “shift-left testing” from conferences, blog posts, industry publications, co-workers, etc. With Agile methodologies (including TDD, BDD, and CI) and DevOps increasing in popularity, “shift-left” is the answer to how QA fits in, making them a reality in your organization rather than merely aspirations. Making this shift changes the view of testing. Instead of traditional QA, it transforms into QE: Quality Engineering.
What Is Shift-Left Testing?
Shift-left testing refers to the integration of testing activities with development, beginning sooner in the development cycle rather than later as it is in traditional software development environments like Waterfall.
This means working together with development and operations and analyzing quality during every stage of development as shown in the graphic below.
For example, testers have to jump in and take a more proactive role even before development starts by being present during the gathering of requirements.
Other activities include:
Testers helping developers implement unit testing.
Planning, creating, and automating integration test cases.
Planning, creating, and employing virtualized services at every stage and component level.
Gathering, prioritizing, and processing feedback.
Some process changes that occur during the shift may include the following:
Instead of waiting weeks to add code to that of the rest of the team, do it every day, or even several times a day.
Instead of manually performing all the tests, automate and run them every day or even several times a day.
Instead of detecting problems at the end, analyze quality as the development progresses.
Why Make the Shift?
In this post, we’ll provide three main benefits of shifting left: reducing costs, increasing efficiency and quality, and gaining a competitive edge.
1. Reduce the Cost of Testing and Development
It is still true what Larry Smith said over 15 years ago when the “shift-left” concept was first introduced:
“Bugs are cheap when caught young.”
One of the aims of Agile testing is detecting errors as soon as possible. What we mean by as soon as possible is as soon as possible after the exact moment in which the error was inserted into the system.
When testing is done with every build (especially during unit testing), the errors that are found are smaller, easier to detect and locate, and less costly to fix. Assuring the quality as we go also means eliminating the tremendous costs and the unnecessary work of having to go back and re-do certain things.
2. Increase Efficiency and Quality
We often find that the increased levels of automation when shifting left allows for:
Increasing test coverage by running more tests in the same amount of time.
Freeing up time for testers to focus on more challenging and rewarding tasks.
Reducing human error.
Monitoring performance over time.
Code quality checks.
Built-in security checks.
Reducing issues in production (that users will face).
Beyond these benefits, being able to start testing sooner invariably results in more quality, as testers are not rushed to find all the errors at the end, only leaving whatever time is left to spare for them.
3. Gain a Competitive Edge
Shifting left your QA gives you a competitive edge in two ways: speed up time-to-market and attract top talent.
About staying competitive in today’s ever-changing technological landscape, Alon Girmonsky, founder of BlazeMeter (acquired by CA Technologies), said it best:
As we can all agree that it is important to deliver software more quickly, it also shouldn’t be rushed out the door. Shift-left testing answers the problem of accelerating development without sacrificing quality.
Secondly, shift-left testing is what software developers and test engineers expect today of their organization, officially becoming mainstream with over 66% of IT workers reportedly using Agile or “leaning towards Agile” methods.
From Zephyr’s latest report, “How the World Tests 2016,” the number of respondents who use Agile/Scrum, Waterfall, or a hybrid of the these are shown in this diagram:
It’s not surprising that one of the key findings of the State of Software Testing Report 2015-2016 was that 55% of testers reported they were already doing or wanted to implement continuous testing and Continuous Integration.
Therefore, if you want to be an attractive employer or at least be on par with the rest, it is important to adopt the modern practices that both testers and developers want to master in order to stay relevant in today’s labor market.
When Shift-Left Testing Doesn’t Work
Maybe you have heard all of those benefits already but are still not convinced about shift-left testing for this reason: you’ve seen that even Agile teams can face the same bottlenecks as seen in Waterfall.
For example, as Shridhar Mittal, former GM of Application Delivery at CA Technologies, explains:
“Due to the complexity of environments and composite applications, Agile teams are often stuck waiting in a queue once all of the pieces come together in the performance and user acceptance testing phases.”
The solution he provides that we agree with is utilizing service virtualization. Service virtualization emulates the behavior of essential components that will be present in production, enabling integration tests to take place much earlier in development. This is how you can eliminate that key bottleneck, while also benefitting from eliminating errors earlier on.
Along with service virtualization, you have several tools to setup your automated systems and CI such as Jenkins, CruiseControl, Bamboo and TeamCity, which all have web management interfaces. Or, you could go with a cloud solution like Amazon Pipeline Code, TravisCI, CircleCI, Codeship and Microsoft’s Visual Studio Team Services.
One Important Note
Just having these tools in place does not ensure a successful shift and does not imply quality engineering. There are several preconditions and a level of testing maturity that must be reached in order to achieve continuous, Agile, shift-left testing. For example, a precondition for test automation would be having the appropriate test environments set up. Without this and several other preconditions, your shifting of QA to the left will be problematic, at the least.
With Agile being the norm, shift-left testing is a key enabler for increasing quality and efficiency, reducing costs and risks, and staying competitive. In shift-left testing, everyone becomes a quality engineer and the responsibility for producing high-quality software is equally shared among the team.
This ultimately results in a better product, shipped even faster.
Who wouldn’t want that?