Keith Collyer
Dec 21, 2020

Generally, I believe it is better for a test to ask "How can I tell if the system is NOT doing what I think it should?". Otherwise you run the risk of writing tests that only cover when things go right. The classic example is where an input field is supposed to accept a maximum number of characters and you only have tests that go up to that number of characters rather than tests that check what happens if you enter more characters.

Keith Collyer
Keith Collyer

Written by Keith Collyer

I’m a husband, father, grandfather, retired Systems Engineer, bassist, cyclist and will write on any and all of those things as the urge takes me.

No responses yet