Testing 123: Should Developers Shift Left or Shift Right?

{authorName}

Tech Insights for ProfessionalsThe latest thought leadership for IT pros

07 April 2022

What's the difference between shift left and shift right testing, and which is best suited for use in a DevOps environment?

Article 5 Minutes
Testing 123: Should Developers Shift Left or Shift Right?
  • Home
  • IT
  • Software
  • Testing 123: Should Developers Shift Left or Shift Right?

Getting a new piece of software from the drawing board to production is always a complicated process. But as technology advances, new ways of doing things aim to keep this as quick and stress-free as possible.

Especially in recent years, many businesses have started to adopt new approaches to software development, moving from a traditional 'waterfall' approach - where each step of the process takes place in sequence akin to a waterfall flowing from top to bottom - to more modern strategies such as agile and DevOps.

This promises to deliver a more responsive approach to creating software that incorporates a continuous loop of development, feedback and refinement. But it can create its own challenges for developers.

One of the key questions involved in DevOps is how to incorporate testing within the process. And increasingly, the answer to this is to take a shift left approach.

What is shift left in DevOps and why is it important?

DevOps offers a number of advantages in today's agile environment. It enables the software development process to be more agile and responsive to changing needs, and can reduce both the total time and cost of building applications. However, to be effective, testing must play an integral role throughout the process.

This means a traditional attitude of testing on completed code to look for issues can result in teams finding it difficult to respond quickly enough to bugs and other necessary changes. This is where a shift left approach comes in.

A shift left strategy essentially involves moving testing to much earlier in the development process. If you visualize the various stages of software development as points on a horizontal timeline, from initial requirements and feasibility studies at the start to deployment at the end, you can see where the name comes from.

The idea of shifting left is to take a more proactive approach to testing, in order to identify and resolve bugs as early as possible, ideally before they have a chance to occur or create any additional knock-on effects.

Shift left vs shift right: What are the key differences?

The counterpart of shift left testing is shift right. This, as the name indicates, involves moving in the opposite direction, with testing pushed further back in the development process, beyond even where traditional testing procedures would be carried out.

In practice, this often means running testing 'in the wild', where the application is available to real users and you can gather useful feedback on how it performs, whether there are any usability issues, or any problems that may occur when scaling up to full load levels - something that can be hard to replicate in a preproduction testing environment.

Shift right testing, therefore, is focusing more on refining user experience, whereas shift left approaches tend to look at functionality and bug fixing as early as possible.

The core benefits of shift left testing

DevOps often recommends using shift left testing principles in order to reduce the cost and time required to address issues, therefore keeping projects on track for both release schedules and budgets.

A key advantage of a shift less approach is that it enables issues to be addressed as early as possible in the development cycle. It's estimated that around 85% of bugs are introduced during the coding phase, and if you're waiting until later in the process to look for these and go back and fix them, this can be hugely frustrating. There’s also the risk that some issues will end up being overlooked.

According to the US National Institute of Standards and Technology, waiting until applications are in production before resolving defects can increase costs by a factor of 30 - with this rising to 60 times more expensive for security flaws. Adopting a left shift strategy therefore greatly reduces this cost.

Other benefits you can see as a result of this include improved product quality, increased efficiency throughout the development cycle and a reduced time to market as flaws can be fixed quickly.

3 steps to implement a shift left strategy

Both left shift and right shift testing have their uses, but if you're adopting a DevOps approach, left shift is often an essential part of this and should be viewed as a key part of a continuous testing strategy.

To successfully implement this, however, there are a few key steps you should follow in order to ensure everyone's on board with the strategy and knows what it will involve. These include:

Step 1: Form a comprehensive plan

This should involve setting out exactly when testing should take place throughout the development lifecycle. It's important to ensure that your QA team is closely involved and providing their input, as they'll be the ones actually executing it.

Step 2: Implement quality standards and security policies

Putting in place clear security policies and quality standards is essential in ensuring everyone is on the same page and using the same technologies. This means settling on coding standards everyone can use and ensuring QA teams know exactly what to look for and how to flag any issues.

Step 3: Know exactly when and how to start testing

Shift left requires you to move testing earlier in the development cycle, but when exactly should this point be? If you test too early, you may end up wasting time working on an alpha product that's not ready. Some firms may find a wholesale shift to the left to be too big a cultural change. Therefore, it may be best to take your time, using an agile approach to test in small increments, as well as embracing automation tools to make continuous testing easier.

Solution Categories

DevOps Software

DevOps Software

DevOps Software refers to a category of tools and solutions designed to facilitate the DevOps approa...

Tech Insights for Professionals

Insights for Professionals provide free access to the latest thought leadership from global brands. We deliver subscriber value by creating and gathering specialist content for senior professionals.

Comments

Join the conversation...