CanalPlanAC

The testing framework

There is a fairly simple automatic testing framwork that is run at build time. There are three sorts of test - code tests run a custom piece of CanalPlan code and check the specific results; page tests generate an HTML page as though by a user and match the results against expected values; and generate tests generate a gazetteer page

Creating a test

To add a new test:

Running tests

The test will now be automatically run during build publish or you can run them at any time by being in the build/auto_test directory and typing make or by running make autotests at the top level.

config.txt

This should consist of lines consisting of a tag, a colon and a value. Valid tags are:

test.can

For code type tests. This should be a standalone program in the CanalPlan programming language. Specific points to note are:

cgi_query

For page type tests. A series of name/value pairs on separate lines that will be passed to the script in the form of CGI input

data_tests

For page type tests.

html_tests

For page type tests.