3 ms·
how is writing tests scalable? how do you decide what to test? three parameters, maybe three classes per parameter, -1, 0, +1.. you now have 3^3 test cases just
by waynesonfire 4y ago
how is writing tests scalable? how do you decide what to test? three parameters, maybe three classes per parameter, -1, 0, +1.. you now have 3^3 test cases just for one function.
- klodolph 4y agoThat's a whole discussion on its own. Tests do not have to guarantee that the behavior is correct for all possible inputs. If testing all possible inputs is easy, do it. Otherwise, you write the tests which you think are most likely to catch errors. Try to exercise different code paths to catch errors in different parts of the code. Try to use different logic in your test from the logic in the code under test.