News for hackers. Stuff that matters.
Re:Stop requiring only one assertion per unit test: Multiple... by LawTalkingGuy on Monday November 07, 2022 @10:51AM (#33507385)
The tests are fatally broken. It means you can't trust them to properly check new work even.

The solution is to use random ordering and print the ordering seed with each run so it can be repeated when it triggers an error. Immediately halt all new work until randomly run tests don't have problems.

This isn't as bad as it sounds, generally it's a few classes of things that cause the interference which each will fix many tests. It's unlikely that the code actually has a 2%+ density of global-variable use, for example.

There are no comments on this comment yet.