08 Apr 2021
With a lot of focus on the Testing Pyramid, more and more tests are developed at the bottom of the Testing Pyramid i.e. at the Unit and Integration layers; and a very few UI E2E tests at the top of the Pyramid. The idea is to keep the tests as close to the code as possible. Is this true Shift-left!
Well, partly yes! Shift Left essentially means that testing should be part of the development process. Moreover, every code push should be ready for deployment.
Developers create Unit tests for all the new code that they write. They should write tests for a class, a function, a module, or a UI component with a focus on very specific functionality of the application. Then they should write Integration tests to test a set of units together. In the end, there should be a few E2E tests to validate the whole app together.
In Shift Left, developers write most of the tests. That means the developer delivers a working product to the tester. Then what do the testers do?
“Testers focus more on Quality Assurance. They pair with the developers and guide them on different tests they need to write at all layers of the test pyramid. Testers act as mentors, with Quality being the pivot. They focus on exploratory testing and complex edge case E2E scenarios. They ensure that the application is easy to use through UX testing. And so on.”
In summary, Shift left quantitatively by encouraging developers to write the tests, as they are closest to the code. Shift left qualitatively by enabling frequent small releases to production in a more agile manner. Finally, let the testers make the product better by helping the team in building quality into the product, throughout the lifecycle.