Shift-Left and Shift-Right for Quality and Agility
Over the last couple of years, the adoption of DevOps has resulted in teams collaborating more than ever before and has given rise to practices such as “Shift-Left and Shift-Right” for ensuring software quality. These practices have helped in developing quality products for our clients from the very beginning of the project by ensuring focus on quality from requirements gathering stage through deployment and steady-state operations.
In simple words, these practices are an attempt to enable organizations to move faster by reducing delivery time, while continuing to improve the quality of each release. This has been achieved by accelerating the feedback loop between the technology team that is developing the software and the business team that is using the software.
In this blog, we explain “Why we need to Shift-Left” and “What Shift-Right means” while discussing how we have adopted these practices within Opteamix to deliver value to our clients.
Relative cost of defect detection
Before we discuss Shift-Left and Shift-Right, it is imperative that we understand the “relative cost of defect detection”. We all know that earlier the defect is found, lesser is the cost of the defect. Defects found in Requirements and Design stage are less expensive to fix v/s the defects found in UAT or production environments. The below chart shows us the relative cost of fixing a defect across various phases of the SDLC:
Over the years, it has been found that a significant portion of software development costs is due to defect fixing of errors and issues identified in the later stages of a project. This rework can be contained by early detection of defects (during the design and requirements phase). To overcome the high cost of defect fixes and rework, organizations have started adopting early testing to find out issues in the early stages. which leads us to the concept of Shift-Left.
Shift-Left: Developers in Testing? Or Testers in Development?
Shift-Left is a practice derived from combination of two common DevOps practices – Continuous Deployment and Continuous Testing. In Shift-Left approach, we define the tests before building the features and is the key to delivering quality software on time and at a reduced cost. The goal of adopting a Shift-Left approach is to get the teams more focused on a “Right First Time” approach wherein testing starts earlier in the SDLC and helps reduce the effort and cost by finding issues in the early stages.
In today’s business environment, where the ability to deliver software faster is imperative, the “shift-left” approach, helps teams keep their focus on quality, work towards problem prevention instead of detection, and helps reduce the duration of a project. Shift-Left facilitates better design and results in overall cost savings.
Although Shift-Left is an essential feature for Agile teams, it can be successfully leveraged by development teams using traditional SDLC models as well.
Shift-Right: Closing the loop with the customers
Given that we all agree that “Shift-Left” is critical to software quality assurance and is a great step in ensuring quality from the very beginning, this approach alone is just not enough as customer feedback in terms of performance and user experience is equally significant in determining product quality. This has resulted in organizations adopting a “Shift-Right” approach (initiates the testing task from the right i.e. post production of the software) towards quality assurance wherein performance and usability of an application is continuously monitored and feedback is obtained continuous from users to modify the application.
The Shift Right approach advocates carrying a certain level of risk by deploying an application to production to reduce time to market and enable the business to obtain end user feedback at the earliest. This approach is based on the Agile concept of “Fail-Fast; Fail-Cheap” that gives the license to fail as long as the business teams are learning and the application is getting better.
The most important characteristic of the “Shift-Right” concept is about the willingness to validate a hypothesis by trying out new solutions, and working with the customers to determine what is or isn't working rather than spending time on assumptions. For example, performance tuning of a feature for days before deployment, would go waste if the usability of the feature does not meet end user expectations. In this scenario, it would be prudent to launch the feature fast, test its behavior in production and then adjust both usability and performance based on customer feedback.
Testers are an integral part of the Shift-Right approach and need to be included as part of requirements elicitation phase. They should also learn and be aware of how users would feel about / use a particular feature. Sharing feedback on how the feature was received by the intended users is made available to testers, enabling them to test such scenarios up-front.
Adapting a Shift-Right testing approach helps in enhancing Customer Experience, provides scope for implementation of Test Automation and ensure better test coverage.
Shift-Left or Shift-Right or Swing both ways!!
Although today more emphasis is given to Shift-Left testing approach, at Opteamix we believe that a combination of both Shift-Left and Shift-Right approaches is critical to ensure that the application is tested from multiple aspects to ensure best possible quality.
Reliance on Shift-left approach means that the testing burden is placed more on the developers, testers and business analysts. Given that stakeholders such as end users and business teams have real interest in adding value to ensure the right software system is developed, it is imperative that they are involved in defining the features and testing the product. The solution is to enable the business teams and end users to be involved in testing features. In other words, we need to “Shift-Right” to “Shift-Left”.
Shift-Left ensures operational excellence and helps in delivering a zero-defect product, while Shift-left ensures that the delivered product is scalable and is user friendly.
At Opteamix, we have found that the implementation of Behavior Driven Development (BDD) and Behavior Driven Testing (BDT) has helped the teams in adapting to a Shift-Left Approach wherein all stakeholders are on the definition of what we should build and agree on what a successful implementation means. Acceptance tests (the assumptions we want to validate) define the completion of the project and effectively drive the development.
Along with BDD, we have also started using unit level Acceptance Testing and automated Acceptance Testing to ensure that the Shift-Right approach is integrated into our quality assurance approach.
We do the Shift-Right through prototype reviews with end users and MVP releases to test the market. This way we are and adopting the ‘fail fast, fail cheap” approach.
A Case in Point: Mobile App Development
We recently developed a mobile platform for a Colorado-based firm with extensive experience in the US construction industry (the second-largest in the world). This platform connects service providers in the construction industry with their customers and is a highly collaborative and interactive app: easy to use, and is similar to social media platforms like Facebook and LinkedIn. Opteamix had an opportunity to implement both Shift-Left and Shift Right concepts on this project.
The Mobile application was developed using Behavior-Driven-Development (BDD) one of the established agile practices to enable Shift-Left testing. We wrote test scenarios that described the acceptance test even before the code was written. This changed the implementation style for the team since test scenarios are written in the context of the desired behavior which helped in developing a Minimal Viable Product (MVP). We also infused end-user testing early to receive the feedback from targeted users to know their experience and observations across different devices, ecosystems, networks etc. The early MVP release was the Shift-Right that helped us re-calibrate, make changes and ship the product that was ready to hit the market.
The Shift-Left and right approaches helped us reduce rework, improve quality and reduce the time to market while the Shift-Right approach enabled us to deliver a product that was in tune with market needs.