Another coverage tweak.
[open-adventure.git] / tests / README
1 = Notes on the test machinery = 
2
3 == Understanding and running tests ==
4
5 A .log extension means it's a game log
6 A .chk extension means it's expected output from a test
7
8 The test files are run in alphabetical order. This allows you to
9 ensure certain tests are run in a particular order merely by giving
10 them appropriate names, e.g.: test.1.log, test.2.log, test.3.log. This
11 is useful for testing save and resume.
12
13 In general, a file named foo.chk is the expected output from the game log
14 foo.log.  To add new tests, just drop log files in this directory.
15
16 To see summary lines from all tests, 'make testlist'.  The summary lines
17 are those led with ##; you should have one such descriptive line at the
18 head of each file.
19
20 To run the tests, "make regress".
21
22 To remake the check files, "make buildregress".
23
24 == Composing tests ==
25
26 The simplest way to make a test is to simply play a game with the -l
27 option giving a log path.  Commands will be captured to that log.
28
29 To re-use a command sequence from an existing log, run advent and
30 paste it to the advent command log from the clipboard.
31
32 To see where we can use more tests, have a look at our test coverage
33 report:
34
35 http://esr.gitlab.io/open-adventure/coverage/
36
37 Improvements in test coverage are always welcome.
38
39 // end
40