Why 'Good Practices' Trump 'Best Practices' in Test Design

Today I have been thinking about why I prefer the phrase “good practices” over “best practices” in test design. My preference is so tenacious that I exchange the word “best” for “good” when the topic comes up, as if I’m trying to change people’s minds in a subliminal way. But why?

“Best practices” is a hammer. It’s dogmatic. But testing isn’t about dogma, it’s about karma: writing the test that needs to written exactly where it needs to be. It’s contextual, it’s as close to the seam as you can get it. Sometimes it should defy convention by design. There’s also balancing acronyms to think of. I’m sure everyone has heard of DRY (Don’t Repeat Yourself), but what about DAMP (Descriptive And Meaningful Phrases), or KISS (Keep It Simple, Stupid)? I can think of many examples where “good” was not what was “best” and “best” wasn’t any good at all, especially in smaller or fast-moving projects, and definitely not by following “best practices” that lead to generating code for the sake of generating code.

While I would rather apply common sense first and layer opinionated convention by exception, that’s not to say I’m throwing the baby out with the bathwater. “Good” is not a synonym for “insane”, but rather taking care and consideration to what you do and when you do it. Nobody is going to argue that spending more time testing and less time writing blind and meaningless checks is a bad thing, so if that’s done in a safe way then all the better.

What do you think? Please get in touch via the social links below and let’s talk.

I took inspiration from many sources more intelligent and eloquent than me when writing this post. I urge you to read them:

The Way of Testivus

Good and Bad UI Test Automation explained – Inspired by Richard Bradshaw’s Tweets

Writing Clean Tests – It Starts From the Configuration


© Joseph Ward 2018-2024. All Rights Reserved.

Powered by Hydejack v8.4.0