Shift Left Testing: Prevention is better than cure

Categories: Quality Assurance | Testing |

Shift Left Testing

The first project I ever worked on as a QA engineer was a big one, and it followed the classic software development methodology or “Waterfall” approach. Our role as testers was to wait until the development team ended their work and the code was deployed to the “QA environment” and then we started “our job in the project”. The rule was: Test and find as many issues as possible, and the bigger they were, the better, so we could prove the importance of having QA before going live.

Then, there were a couple of rounds of bugs fixing and retesting. So, the software development lifecycle was conceived as the following:

Shift Left Testing

Concept of Shift Left Testing

With the introduction of Agile methodologies into software development, people quickly realized that introducing testing earlier during the overall development cycle (shifting the testing to the left), represented an enormous advantage because the cost of fixing the bugs identified at the end was very high and they required a lot of effort and time. Defects found in the early stages of the development cycle are cheaper and easier to fix than those found in the later stages.

If you look at a couple of definitions for “Agile Testing” you will find that all of them mention that testing and development tasks should go together, from the beginning of the software development cycle until the very end, following the idea of preventing bugs instead of just finding bugs.

This Shift Left approach allows you to perform continuous testing from the very beginning of the project and, if we do mention Agile methodologies, testing begins with the test strategy definition, and then in every Sprint Planning. If applied correctly, shift left testing helps to identify and avoid bugs in the early stages of the SDLC. It is a strategy that suggest different testing types, leading to “end-to-end” testing, implicating regression testing and automated testing.

To sum up: the shift left testing approach involves a testing team which participates in the whole development process from the very beginning, interacting with stakeholders, asking questions to customers and business analysts, clarifying and refining the requirements, and designing the test cases that will help developers to code the right product.

As an additional advantage, this greater involvement means testers gain a full understanding of the product and start to consider the scenarios and test cases.

Shift Left Testing

Fixing bugs in early stages: Some advantages

Fixing bugs is time consuming, regardless of which stage of the development lifecycle they are found. But late bug fixing can cause big problems. Some of the reasons why finding bugs early is better than finding them at the end of the lifecycle include:

  • Save fixing time. Some issues, take more time to fix if they are detected in the later stages of the process. This is because frequently there are other bugs associated with them, then more fixes are needed. On the other hand, the code is still fresh in developer’s head if the bug is discovered as soon as it is introduced.
  • Several bugs lead to harder fixes. It is simpler and faster to fix one bug discovered in the early stages of the development than to face a bunch of bugs found close to the release date (when testing is done at the end of the lifecycle). It is easier to identify the root cause of one issue before it becomes multiple related issues.
  • Buggy code will negatively impact your team and company reputation. If the product you give to the end user, for instance in a demo, is full of bugs, your reputation will suffer. The navigability, the performance, the product feeling will be affected and the end user will have a poor experience interacting with it. This will then have an impact on your business.

Five Shift Left Testing Best Practices

Based on my experience with shift left testing, I want to share 5 key best practices:

  • Bring together project management and development with testing. Here, make sure to clarify the stages to be tested and what will be tested in each stage.
  • Establish quality standards and controls. This helps to determine if development is aligned with QA, and to discover and fix deviations.
  • Share quality responsibility among the whole team. It is essential to ensure that quality does not fall just upon the testing team. It encourages team collaboration and pushes team members to change their roles during the SDLC when needed.
  • Adopt test automation. This helps integration testing to get faster deliveries. Testers can focus on bug detection and developers can focus on building the testing framework.
  • Regular peer reviews. Auditing the code and tasks frequently ensures that the application is delivered with better quality and that it is ready to be moved to the next phase.


Shift Left Testing: A Secret Mantra for Software Success

Our Definition of “Agile Testing”

Related content

4 tips when migrating from Object Oriented Programming to Functional Programming

How to decide between RDBMS and HADOOP?