One of the most important trends within DevOps is the ability to shift left – to test and validate software and systems earlier in the change delivery cycle.
Even with agile teams, typically the end-to-end and regression testing and mitigation of any issues in software or environments often occurs near the end of the release process. The challenge presented by the traditional approach is that by discovering any issues right at the end of the process, the race would then be on to fix them by the deliver deadline.
When not fixed by the deadline, businesses are presented with a costly choice between postponing the launch or releasing flawed code. If companies postpone the launch, they may lose out on potential revenue or disappoint customers. In other cases, the immense pressure on engineering teams to deliver by the deadline results in known flaws being released. This may result in functionality issues for users, or worse, privacy or security concerns. In fact, one survey of IT decision makers revealed that 83 per cent had released code before testing and/or resolving security issues in the code.
With the cost of poor-quality software costing approximately $2.84 trillion in the US in 2018 alone, improving the software development process from the initial idea through to deployment is absolutely critical. Indeed, those companies that show a continued commitment to the overall quality of software are now able to leverage it as a market differentiator.
The potential of shifting left
Shifting-left is critical to improving the overall quality of software, which is increasingly becoming a market differentiator for many firms. With this approach, testing is performed much earlier in the software development lifecycle. This helps the team identify design defects much earlier and before significant efforts have been put into their implementation. It also ensures it facilitates a quicker and easier remediation of bugs, as the process becomes more difficult as more software components are produced and integrated.
Taking this approach, software engineering teams can focus on predictable quality and preventing issues can be prioritised over ad-hoc detection. When testing begins earlier in the development lifecycle, the engineering teams find and fix flaws whilst in pre-production, enabling businesses to save time, effort and potential lost revenue.
Shortening the feedback loop, through shifting left, also enables organisations to be more agile and adapt faster to changing dynamics. In the digital economy, the rate of innovation is rapidly increasing and plays a fundamental role in the competitive advantage of businesses. Whether that’s a new technology integration, a new service mandated by the customer, or reacting to the constant pressure of a fast-paced and fiercely competitive industry, the ability to create quality software quickly has become integral to the success or organisations across all industries.
Barriers to shifting left
With a recent survey revealing that 85 per cent of organisations have already adopted DevOps or plan to in the coming two years, it’s clear that the shift left mentality is becoming a staple of modern software development. However, while many CIOs understand the value of shifting left, inconsistencies across run-time environments, processes and tools make it impossible for many organisations to truly embrace that thinking.
Consistency is at the heart of a successful cloud strategy and must underpin the entire change delivery workflow by ensuring that all environments are consistent. Currently, many organisations are testing new releases or business demos in staging environments. When, as is commonly the case, the production environment differs meaningfully from this staging environment.
This lack of consistency ultimately prevents the entire organisation from shifting left, presenting a number of issues that hamper engineers from delivery the high quality of software that is required by ever-increasing expectations around a flawless customer experience and the growing threat of cyberattacks exposing security bugs. These include:
Finding false negatives - If testing in another environment, organisations may find themselves receiving false negatives. This undermines the entire shift left approach of “fix fast and early”, and making it nigh impossible for developers to find and remediate all the problems within their software.
Most businesses can quantify what a problem in production will cost them. For example, an application going down for an hour may cost a retailer thousands of pounds in lost sales. So, if testing were able to catch 50 per cent of flaws, the cost for such an incident would be halved.
The risk of false positives – The challenge for software engineers is exacerbated by the fact that it is not only existing flaws that are missed when testing in an inconsistent staging environment. Indeed, testing in a different environment will also introduce a great number of false positives in the user acceptance testing (UATs). This will impact confidence in the validity of those initial tests.
Creating a more consistent pipeline
To improve consistency and reduce the risk of both false negatives and false positives, it’s important to make all the environments throughout the change delivery pipeline as similar to that of the production environment as possible. It must closely reflect the final production environment, including infrastructure, databases, operating system, firewalls, patches and configuration.
This is near impossible in the traditional provisioning process, as the environment as typically heavier and more detailed than those used in the development – and often driven by manual changes. However, by using modern cloud approaches and Infrastructure as Code, you can get much closer. By managing cloud environments with software, the staging environments can much more closely mimic the live environment, helping to eliminate issues that arise due to simple configuration inconsistences and drift.
Shift left is integral to the software development process as deadlines become shorter and users become increasingly intolerant to anything but a flawless experience. Consistency is at the heart of truly enabling developers to shift left, so it is important that CIOs explore which barriers are preventing their team from adopting this trend to deliver the true ROI of modern cloud adoption back to their business.
Iskandar Najmuddin, Lead DevOps Consultant, Rackspace
Image Credit: Profit_Image / Shutterstock