Creating a best-selling test isn’t magic – learn to read between the lines.
*Warning: Harry Potter spoilers ahead* When we find those pesky bugs in production, hindsight often allows us to see what logical leaps and assumptions we made while developing, which part of the software we failed to examine carefully enough before release and how we could have caught it, had we only known.
Narratology is study of stories: examining the structure and function of narratives. In Harry Potter and the Philosopher’s Stone, we join Harry in his surprise when he finds Quirrel at the Mirror of Erised, instead of Snape who he (we) had expected to find. In hindsight, narratology allows us to pinpoint not just that we were misled in Harry Potter, but how. In a pivotal scene, Harry’s first Quidditch game where he is nearly thrown of his broom, J.K. Rowling employs a clever (and rare) switch of perspective, so that we do not see the world from Harry’s eyes, but from his friends. This switch of perspective changes our sense of time, misleads and encourages us to draw the wrong conclusions as to what is really happening.
I'll explain the basis of narratology and apply it to our software development and testing. I encourage you to emulate Hermione’s critical outlook into the world around her, and challenge you to examine your software in a similar fashion. (Added bonus: knowing the building blocks of narratology also allows you to become a better storyteller.)