Shift-Left vs. Shift-Right – How to Combine Two Basic Approaches to Testing? 

At the end of the TestCrunch blog, I said goodbye to the QA team and welcomed my new position as a DevOps engineer. Crossuite is the first project at bart to have such a position. It arose mainly from the need to constantly improve existing CI/CD processes and design new automation. One of the questions that has kept me busy lately is how to properly combine Shift-Left and Shift-Right approaches to development.

As I mentioned in the aforementioned blog, the process of testing the quality of the project is a solid part of our development. In general, there are two basic approaches to the question at which stage of development testing should be intensified.


Source: https://www.dynatrace.com/news/blog/what-is-shift-left-and-what-is-shift-right/

To the left it’s cheaper

The Shift-Left approach generally means moving testing and quality assurance to earlier stages of the development process, often before code writing begins. “Left testing” usually involves writing unit tests during the implementation of functions, but often functional or integration tests are also used. Tests take place at the beginning of the Scrum iteration to address detected problems as soon as possible.  

This approach is particularly crucial for agile development like ours, as it promotes collaboration between developers and testers from the outset. Thanks to this, the team has more control over the quality of their code and the results of the tests are subsequently included in the course of the entire further development. This can lead to faster detection and correction of errors and an improvement in the overall quality of the software.

The main advantages of the Shift-Left approach include:

  • better and more clearly defined user scenario requirements; 
  • time and financial savings in correcting errors 
  • and quality assurance from the very beginning of development. 

On the other hand, the drawback is the absence of UI verification, end-to-end validation, and the lack of user feedback overall. This is where the Shift-Right approach comes into play.

To the right it’s about quality

Shift-Right, on the other hand, refers to shifting testing to later stages of the development process, often up to the deployment phase. It mainly focuses on getting feedback from real users, usually after the development is completed. Techniques such as end-to-end testing and A/B testing are used.

This approach allows you to control functionalities in a real environment and evaluate their performance, stability and safety. Thus, it provides the ability to detect errors in real operation and detect less known user scenarios. However, the disadvantage of this approach is the higher cost of error correction.

The right combination

Practice shows us that these two approaches aren’t contradictory, but complementary. After all, software development is a complex process, and it’s the combination of Shift-Left and Shift-Right approaches that allows us to get a whole package of improvements – higher quality, faster delivery and better feedback from users. 

Therefore, while agile teams should prefer Shift-Left Testing for clearer specifications, smoother implementations, earlier testing and lower costs, they shouldn’t forget the benefits of Shift-Right Testing – user feedback based on real usage scenarios.

How do we do it now and what are we going to improve?

On the Crossuite project, we involve our QA team in every stage of development – from planning to final handover of a finished part of the project. And although testers began to work more or less in the direction of Shift-Right, today we’re trying to push them more into the Shift-Left space, mainly in the form of collecting their feedback at the beginning of the design of new features. Specifically, the following steps are also involved:

End-to-end in Shift-Left too

We implement the end-to-end tests, which are normally part of the Shift-Right approach, already at the planning stage, based on the prepared graphics, according to identifiers. Thanks to this, the developer who follows the set rules during programming can also continuously check the user’s end-to-end page of the upcoming feature. 

Performance and security testing

In the Shift-Left phase, performance testing is also becoming a high priority for us at the moment, in order to detect potential performance errors as soon as possible. In current tests, although we limit the maximum time within which the application should provide an answer to the user, this is still not enough. That’s why we’re currently working on creating a set-up so that we can test new parts of the code with a large volume of data as soon as during development. This will prevent any problems with the growing database of information that the application will have to work with in the future. We’re also going to strengthen security testing. 

The Shift-Left approach is very important to us, because when something goes wrong in the “left” phase, fixing it in the “right” phase is more difficult, costly and inefficient. This approach thus brings positive results for users, customers and developers. We believe that thanks to it, we’ll record less serious errors and speed up the publication of new versions. 

After all, this is the most important thing for me as a DevOps engineer, to accelerate development and help the QA team minimise bugs by detecting them early in the development of new functions. So after implementing the planned changes, I’ll be happy to share the newly acquired knowledge with you in the next blog post.