1.1 --- a/docs/wiki/Testing Mon Nov 02 00:06:26 2015 +0100
1.2 +++ b/docs/wiki/Testing Mon Nov 02 20:08:20 2015 +0100
1.3 @@ -1,5 +1,16 @@
1.4 = Testing =
1.5
1.6 +Before attempting to integrate imip-agent with other system components,
1.7 +it can be useful to check whether the different programs function as
1.8 +expected by themselves. Should errors or faults occur, these would need
1.9 +to be remedied first before attempting to get the software working with
1.10 +the [[../MailIntegration|mail]] and [[../WebIntegration|Web]] system
1.11 +components.
1.12 +
1.13 +<<TableOfContents(2,2)>>
1.14 +
1.15 +== How the Software Works ==
1.16 +
1.17 To see how the software operates, you can run one of the agent programs
1.18 provided in the distribution. For example:
1.19
1.20 @@ -70,3 +81,26 @@
1.21 consults its own records, makes a decision about scheduling the event,
1.22 and indicates the kind of response it would like to send back to the
1.23 requester.
1.24 +
1.25 +== The Test Suite ==
1.26 +
1.27 +A script called `test_all.sh` is provided that runs a test suite (found
1.28 +in the `tests` directory within the source code distribution), initialising
1.29 +new and separate data store instances for each test, running programs that
1.30 +are presented with message content, and testing for the desired effects of
1.31 +running those programs with such content.
1.32 +
1.33 +Individual tests may also be run directly from the topmost level of the
1.34 +source code distribution. For example:
1.35 +
1.36 +{{{
1.37 +tests/test_resource_invitation.sh
1.38 +}}}
1.39 +
1.40 +Should everything be functioning correctly, `Success` should be reported
1.41 +repeatedly as opposed to `Failed`. If the latter occurs, the output of the
1.42 +tests should be inspected: a number of files whose names end with `.tmp`
1.43 +will have been saved in the current directory, and these will contain the
1.44 +output from various commands from the last test script invocation; the
1.45 +`err.tmp` will contain tracebacks indicating serious error conditions,
1.46 +should any have occurred.