Testing?

Can someone explain testing to me? I don’t understand really what it is, how to do it thoroughly, or why its necessary. When I try and figure out if something in my game works I just quickly play through to that point - obviously in the case of long games this would take forever, but the game I’m currently working on is small and there is no way to die. Should I still add testing? And how?

I assume you’re asking about Inform’s automated test features, which include the Skein and the TEST command. (Chapter 24.2.) These automate the process of playing through point and trying some commands.

This stuff isn’t necessary – you can test everything by hand. But the automated features can catch stuff that you don’t have the patience to find yourself.

With Inform, the most common way problems can sneak up on you is when you add a rule that accidentally pre-empts some rules you already wrote. Say you write a lot of rules around TAKE HEAVY ITEM, and you get all that to work correctly. Then, later, you add a rule “instead of taking…” which is too broad. You might not realize that it broke your heavy-object puzzle earlier in the game.

Is this likely? It depends on your work habits.

1 Like