aboutsummaryrefslogtreecommitdiff
path: root/vo/votest/README
blob: 0845878da4d932943f6924a137a89c8204ff75c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78


			VO Test Package

    The VOTEST package allows users and developers to create simple scripts
that can be used to run a regression test on the package after changes to
system interfaces, test for specific problems to be sure they done recur,
and the ensure that the help examples continue to function as specified.

This directory contains the following:

	README			This file

	data/			Sample data directory
	tests/			Test script directory

	run_test.cl		Utility task to execute a single test
	test.cl			Main test script

	votest.cl		Standard package files
	votest.hd
	votest.men
	votest.par
	doc/			Task documentation directory
	

Test Script Usage:
------------------

    The package defines a single (visible) task call TEST with the following
usage:

	cl> test [<module>] [list] [verbose]

where
	module		Either 'all' or the name of a specific test module
	list		If set, list available tests only
	verbose		Print verbose output

If no parameters are specified, all tests are run.


To Add A New Test:
------------------

    Test scripts are placed in the 'tests' subdirectory and are expected to
follow the following conventions:

    1) A description of tests in a "module" is contained in a file 'module.men'
       and should contain something like

	    #  Module Tests -- Tests of the stuff needing testing

	           module_001 -- test 1 description
	           module_002 -- test 2 description
		       :	      :   :     :
	           module_NNN -- test N description

	Lines beginning with a '#' will be used to comment the tests being run.
 
    2) A module test script contains commands to be executes.  It *should*
       also set the "votest.descr" parameter to be some short description
       of the test, this text is printed when the test is run.  Test scripts
       should be named using the convention 'module_NNN.cl' where "module" is
       the common module name, "NNN" is some running number for the test, and
       the script is expected to have a ".cl" filename extension.

    3) A module test script that produces any form of output should have the
       expected output in a file called "module_NNN.out".  A test is deemed to
       have passed when a diff of this file with the output of the test script
       produces no output (i.e. no differences).

    4) A "test module" is comprised of all the above ".men", ".cl" and ".out" 
       files.  Typically tests will be grouped by some common these, e.g. a
       particular task or feature of the system to be tested.

The TEST task will automatically execute any scripts in the 'tests' directory,
minimizing the amount of changes required to add a new test.