Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
Sometimes you want to write tests for a business rule that's based on multiple variables. Covering every possible permutation of the variables quickly becomes unsustainable. I've found myself using a different approach — one test for the positive case, and one test for each variable's negative case.
It really depends on what problem you experience the most. Automated tests do require an awful lot of maintenance, and minimizing the number of tests you need to track all the invariants you care about is something that helps everyone in the long run.
It really depends on what problem you experience the most. Automated tests do require an awful lot of maintenance, and minimizing the number of tests you need to track all the invariants you care about is something that helps everyone in the long run.