Srikanth Sastry

Unit Test Attribute Trilemma

๐ŸŒณ Evergreen ยท

Unit test suites have three attributes in tension: accuracy (if a test fails, is there a real bug?), completeness (if there is a bug, will a test catch it?), and speed. You cannot maximize all three. High accuracy plus completeness yields a huge, slow suite. Accuracy plus speed sacrifices completeness. Completeness plus speed requires over-mocking that tanks accuracy. The quality of a suite is determined by its weakest attribute.