Agile and DevOps practices have gained popularity in the last few years, and embracing these practices has resulted in a significant change in the way software is developed and tested. It has been found that close collaboration between developers and testers, right from the initial development stage, is a key ingredient to delivering high quality products.
Agile testing is also referred to as Shift Left testing, whereas DevOps is referred to as Shift Right testing. This article aims to clarify the terminology, and to explain the practices involved in both. Reading this article will not only help you understand these practices, but will also give you insight into how to appropriately apply them.
The major difference between Shift Left and Shift Right testing practices, is the stage of the release cycle at which they are applied. Shift Left is applied during the development phase, and Shift Right is applied at the production stage.
What is Shift Left Testing?
Shift Left Testing, or Agile Testing, follows the philosophy ‘Test Early Test Often’. Our previous blog article on Agile Testing can be found here: https://www.metasyssoftware.com/blogs/agile-testing.
Shift Left Testing uses very early customer feedback to improve the quality of the release, allowing the product to reach the market sooner, and can therefore lead to a much better ROI.
There are a number of practices that can be included in Shift Left testing:
- Unit Tests – Often created to make the development process more agile and improve the quality of code at the unit level. Developers usually write unit tests for component testing.
- Service Virtualization – When developing software components there is likely to be a dependence on other components such as web services and APIs. For typical testing, these services need to be in place and running at the time of development. However, if these services are not available at the right time, it may lead to a dela Service virtualization involves simulating service behaviour such as requests and responses, and sample stubs of that specific service are used to continue with development and testing.
- TDD (Test Driven Development) – TDD is a development technique where tests are written before code is written. This reduces the number of bugs from passing on to the next phase, as the tests allow for early detection of many errors.
- BDD (Behaviour Driven Development) and Testing – BDD is a development technique where the focus is on building an application from an end-user and business perspective. BDD focuses on system-level behaviour rather than on component level behaviour. It requires developers, testers, BAs and business participants to understand and define application behaviour in different circumstances.
- Load Testing – In this practice, the developer tries to understand system behaviour and performance under different peak conditions and tries to improve the system performance with heavy loading conditions in mind.
Advantages of Shift Left Testing:
- Testing Early Testing Often helps to catch defects early and reduces the cost of fixing errors.
- Short feedback cycles from customers contributes to improvements in customer satisfaction.
- Maximizing automated testing and minimizing manual testing helps the product to reach the market earlier.
What is Shift Right Testing ?
Shift Right Testing, or DevOps, in the production environment can be seen as a post-production activity, where monitoring of the product performance provides feedback from end users. It follows the philosophy that a continuous feedback loop between users and developers is essential for the success of the product.
With Shift Right testing, a completely built and fully functional application is tested by the real end-users and the real-time data is used to improve performance and remove functional bottlenecks in the system.
There are a number of practices that can be included in Shift Right testing:
- App Performance Monitoring – monitoring in the production environment can be performed using various tools like AppDynamics and New Relic (for more information on New Relic visit our blog article: https://www.metasyssoftware.com/blogs/improve-performance-of-web-applications).
- API Monitoring – API performance and behaviour is monitored in the production environment using tools like Postman, AppDynamics and New Relic APIs.
- A/B Testing – This refers to testing an application for various non-functional aspects like usability and The process involves comparing two versions of the same page and determining which performs better.
- Canary Deployment – This is a deployment strategy to reduce the number of defects in production. In this strategy, the application is made available to a small subset of users first. The application performance and behaviour is then monitored for a short time period, usually a few days. Based on user feedback, a decision is made regarding whether or not the application is ready to be rolled out.
Shift Right Testing Advantages:
- Shift Right practices are important for getting behaviour and performance data, which allows identification and removal of bottlenecks and improvement of application stability.
- It allows for load and performance test scenarios which are almost impossible to achieve in development and test environments.
- It provides increased test coverage and scope for automation to save time and effort.
At Metasys, we have extensive experience in both Shift Left and Shift Right Testing practices, and follow both as per the project requirements.