A cry for creativity

I keep seeing entities getting created in our automated test harness with mind-numbingly tedious names like entity1, entity2, entity3.

I’d love it if people would exercise a bit of inventiveness and create entities with more interesting and memorable names.

There are a few reasons for this: Entity1, entity2 and entity3 implies some kind of order; but most of the time entity1 isn’t in any way before entity2. They’re just instances of a class of thing. Worse, depending on how these entities are indexed, you may trigger terrible performance during testing, because these similarly-named entities will have resulted in an unbalanced tree.

Secondly, those bland names don’t tell me anything about what those entities are for, or what discriminates them. The name of something should tell me something interesting about it.

For example, chances are somebody called Samhbh Górsky has an Irish mammy and a Polish daddy. But keystore_server_4.jks’? It’s a keystore, but for what purpose? Not a clue. (Do you also see the opportunity for internationalisation tests?)

Go on, next time you have to pick a list of names, go crazy and choose fun names that are memorable, mean something and might even trigger a bug — and avoid a red-herring during performance testing.

May 11, 2012


Previous post
Recommended reading for testers An old workmate of mine, Janesh, got in touch to ask me for my recommendations of books on testing for his team. I’ve been meaning to write a few
Next post
Book review: “The Mighty Micro” As well as my other hats, I’m a bit of an amateur historian of computing. Recently, I’ve been reading this decades-old book, “The Mighty Micro”, by