3 ms·
> You could design assertions in a very sophisticated way to minimize that problem, and optimize amount of information... but that's complex and brittle and tim
by r0s 6y ago
> You could design assertions in a very sophisticated way to minimize that problem, and optimize amount of information... but that's complex and brittle and time consuming.
My point here is this optimization is really pretty simple. One target state per test, and soft assertions for the rest. It's actually a simplification rather than adding complexity.
Soft asserts make your tests more robust by definition, lots of halting assertions break more often, they are brittle by design.
> If you have a decent test coverage with well written tests ... you're golden
Hey if your tests catch all bugs, it ain't broke, don't fix it!
Totally understandable if you aren't looking for optimizations like this. For the massive test suites I work on, it's necessary to at least consider these concepts.