3 ms·
if i could only afford a single test, i'd much prefer it to be an integration test rather than a unit test. but, some kinds of code can permit a huge number of
by shoo 5y ago
if i could only afford a single test, i'd much prefer it to be an integration test rather than a unit test.
but, some kinds of code can permit a huge number of execution paths with different behaviour and interactions that need to be tested. If you want to cover all the different paths using only integration tests without decomposing a system into simpler subsystems that can be tested more locally, then you end up with a combinatorial explosion in the total number of execution paths and the number of test cases you have to write and maintain.