April 30, 2016
Follow me on Twitter

Unit Testing A Story

Unit Tests are short and tightly focused tests that check the behavior of a specific object in the program. Over the past decade, unit tests have become central to a lot of programming practice. It’s common, for instance, to write tests before the object to be tested has been written. Tinderbox has about a thousand unit tests.

I’m working on wrapping up a draft of my school story to submit to the Creative track at this year’s hypertext conference, and I’m building some unit tests to make sure things behave as they should.

Some tests simply check for consistency and plausibility.

These need to be rough and ready, because lots of revisions remain, but they create some protection against a last-minute blunder.

Other tests double-check my own convenience and assumptions.

Finally, I’ve set up a mechanical reader that doesn’t understand anything in the text but merely follows links at random. People have done this before – I’ve done it before myself – as a way to study finished hypertexts. I expect that this sort of Markov process has been used to inform composition before, but I can’t think of an example.

If you know any published work on unit testing hypertext narratives, interactive fiction, or digital stories, I’d love to know about it. Email me.