I’m currently working on a project that involves very complicated lifecycles. For comparison, imagine testing a chess match where you have to specify exactly where each piece is, except each piece is actually a short history of other chess matches and all their moves.
I have found it almost impossible to have one assertion per test. I find that I have to play out whole scenarios and assert along the way.
In fact, some of the tests in my current project are so big that I have accompanying diagrams saved as pngs in the test/support directory, as visual aids to help future devs understand what is even happening.
So I admire the spirit of “one assertion per test” and in theory I agree with the effort, but I would not make it an absolute rule. Like almost everything else in programming, it all depends on 1 thing - the domain, what you’re describing with code.


















