Things that aren’t testing frameworks

Written by chriscooney | Published 2019/01/28
Tech Story Tags: software-development | tdd | bdd | agile | testing-framework

TLDRvia the TL;DR App

One of these will shock you.

  • The Lion King
  • The feeling you get when you see a kitten sneeze
  • The dance you did drunk at your Uncle’s wedding
  • Test Driven Development

Yes, THE LION KING is not a testing framework

Mufasa might be wise but if he’d done a few more pullups, the plot of The Lion King would have been way more pleasant. Think a decent testing framework would have let this guy be king!? Think again.

And while we’re here, guess what else isn’t a testing framework? TDD! Yes, you’re writing some tests. YES, you’re making those tests pass, but NO — No, No a thousand times NO — it is not a testing framework. The aim of TDD is to produce high quality, highly testable, well understood code. The aim is NOT to produce a rigorous suite of tests, your work is still ahead of you on that one. The clue is in the freaking title — Development driven by some tests. If it helps, Dan North recently suggested thinking of it like “Example guided design”. Your tests are your examples of how you want your system to behave, but they aren’t an exhaustive set of measures that ensure your code is secure or that it performs well.

And while we’re on the Topic of Dan North

Dan North dreamt up a fantastic design technique called Behaviour Driven Development (BDD). The aim is to discuss your system as a whole and, using some specific language, create scenarios that describe how your system should behave. Liz has also written extensively about the Cynefin framework, which is another gem to go and unearth. Anyway, BDD helps to unearth assumptions, create shared understanding and provide a wonderful artifact for people in a multi-functional team to collaborate around.

Well, nowadays people think that if they write a few “BDD Tests”, they’re sitting pretty. We seem to think that if we just check that the system is doing what it should be doing, it’ll be fine right? Wrong. A weird BDD scenario would be “Given the system is running functionally, when the database is under high load and CPU hits 95%, consumption should slow down to allow the database to catch up” but shit, if we don’t test for that, we’re gonna fall over at the first hurdle.

You’re not doing testing!!

This is not a resilience test

I know it’s comforting to think that you can design and test at the same time, but they are different pursuits. You can do them bit by bit, for sure. Design a bit, test the shit out of it, design some more, then get swinging at it with a baseball bat. But don’t kid yourself into thinking that, by virtue of a magical design that functionally does everything you want, you’ve somehow followed the necessary rituals and you have a production ready piece of kit. You don’t. Now break out Gatling and get those AWS vCPUs working.

By the way, if Mufasa had read Sun Tzu like apparently every other leader in the history of the world, he would have handled Scar no problem. Biggest blindside since Tywin Lannister and toiletgate.


Published by HackerNoon on 2019/01/28