Unit testing
Unit testing helps us meet the shift-left approach by moving the testing to the development phase and helps meet the automation portion as well. Developers need to embrace the use of unit testing by using methods such as test-driven development (TTD), which prescribes writing the test first based on good acceptance criteria. The TTD process has a life cycle of writing a test that fails, then writing the code that makes the test pass, and finally, refactoring the test and the code.
The unit testing life cycle
The unit testing life cycle is made up of three steps; the following figure demonstrates the process:
When deploying distributed systems, having a high level of confidence in your code base is vital and also lets you worry less about introducing bugs that can have a rippling effect across microservices. Unit tests can prove to you that the code is working the way you expect it to and help...