Automated testing for Inform 7 skeins?

Is there a good way to automatically test an Inform 7 program? I have a complete game runthrough in my test commands, and I also have a bunch of test commands that go various places and run bits of the game through their paces, but the problem is it means that my skein is about sixty nodes wide at the very top, and it’s impossible to check if I broke something other than scrolling around looking for the little red “blessed transcript doesn’t match” star. It would be nice to have some way of playing all test commands and having it report back if any were different.

1 Like

I can’t comment on an inside-the-IDE method for the Skein, as I don’t use the Skein.

If you’re prepared to go out to the command line, Zarf made this regression tester which could help you do what you want to do:

I’ve not used it myself, only because of my technical inability to get it going/set up. I have a friend who swears by it and has tried to get me into it.


1 Like

I’ve used it. It’s good at its job.

If you’re using 10.1, it’s probably worth noting that a testing tool, intest, is part of the suite and is an option. (I wouldn’t choose it over regtest personally, though.)

1 Like

I, uh … think I’m that friend :slight_smile:. It’s great for detecting even minor changes.

Regtest is great, though you may need to jump through hoops to make a virtual machine on windows. Once you do, you can probably crib from other reg-* files you may find. It also helps to have minimal scripting knowledge, or at least borrow from other people.

The big trip-up is, you also need to watch for unusual forms of input…a game can stall out on “Do this? Y or N>” … so I had to create some stubs to say “Okay, answer the next y/n question with yes.” If not, the script times out after 30 seconds.

One big advantage is that you can UNDO, so if you want to test a branch near the game’s end, it’s a lot easier than the TEST command in inform 7 code. I forget if the skein allows undo.

Another advantage is that, if you have, say, 3 independent branches A B and C, you can claim them as (sort of) functions. I’ve attached an example below. The commands aren’t what’s important, but using command-sets is.

I attached this script as an example. It basically makes sure everything that should score points, does, given all possible orders…

reg-lljj-lone-hub-combos.txt (5.0 KB)

I wish we had a repository of reg* files, because I’m interested in what other people may try, and I’d love to give help where i can.

I don’t think the relief I’ve felt just knowing things that shouldn’t break, didn’t, can be overstated.

1 Like