Code robustness
In Chapter 4, Building Efficient Test Suites, we discussed the types of variable values that our testing strategies should cover. Among these values, we identified three types of test cases covering our parameters:
- Base cases
- Edge cases
- Boundary cases
We further identified corner cases that occur when multiple input variables are supplied with edge case values. We should write test cases that cover a broad range of values for the inputs supplied to our functions.
In the world of microservice architectures, we often don’t have control over which values are supplied to our services and functions, so the code we write should be stable under a variety of scenarios. In order to achieve this stability, we should implement a well-designed, well-tested robust code base.
Code robustness is an often overlooked quality that can help us achieve code that will remain stable even as it changes and goes through refactoring cycles. Figure 10.1...