A silly bit of friction in writing good tests is coming up with consistent, distinctive names for the models or object you may create. Libraries that generate fake names, like Faker, are fun for this, but they don’t produce consistent results. Thus I end up thinking too hard.
Instead, I like to use names from various fictional-ish universes:
- Wile E. Coyote and the Road Runner: Acme Corp, Ajax, Fleet Foot corp. etc. Bonus: read through the extensive laws and rules of this universe!
- Mickey Mouse universe: you can’t go wrong with putting Disney trademarks in your code.
- CIA cryptonyms: when I want my teammates to wonder if they know everything going on with our project.
Hopefully my teammates enjoy these little easter eggs as much as I enjoy looking them up when I need something fancier and less dry than metasyntactic variables.