|
This is a kind of test to test program that doesn't only write something to the standard output stream but also changes files in the directory that it launched from.
Next approach is used for such programs:
<exec_check_directory> <spec> <sname>short_name_of_test</sname> <fname>full name of test</fname> <descr>description of test</descr> </spec> <cmd>command line for test</cmd> <out>test result base path</out> <in>name of file to send to input</in> <input>text to send to input</input> <res>test return code to compare with</res> <path>test path</path> <main>test main result file</main> </exec_check_directory> |
cmd |
Command line to launch tested program. Result of work of this program is compared with etalon. izh_test adds nothing to the command line when launches the program (except substitution of variables) from subdirectory "r" of directory defined by field "path". The directory "r" is filled by content of subdirectory "t" of directory defined by field path |
out |
Base file name for "test file result". By default is "output.txt". Usually this file name has an extension. If the file name looks like [name].[last_extension] then
Before using of these file names izh_test adds path to the directory with file description of the test to it so you don't have to use %test_dir% . |
in |
Name of file. Its content will be sent to the standard input stream of the tested program. If fields in and input (see below) are empty then izh_test will send nothing to the standard input stream of the tested program. Before using of this file name izh_test adds path to the directory with file description of the test to it so you don't have to use %test_dir% . |
input |
Text which will be sent to the standard input stream of the tested program. This field is used only if field in (see previous definition) is empty. Otherwise (field in contains name of file with data), izh_test will send content of file with name in but content of field input will be ignored. If fields in and input (see above) are empty then izh_test will send nothing to the standard input stream of the tested program. |
res |
Expected code of return for tested program. By default it is zero. If tested program returns another code, izh_test produces warning. |
path |
Path to the test directory with subdirectories which contain etalon data "before work" ("t") and "after work" ("e"). It is defined relative of the directory where placed file with test specification. |
main |
Is used usually for gui-tests. This field defines which file from the directory "after test" will be main (which file should be compared first). It is convenient for example sometimes for testing reports, When report isn't written in the standard output stream but stored in a file. This file name is defined relatively on the directory where test is run ("r"). |
spec | Identification information for the test (names, descriptions) |
sname | Short name for test, that is used as test name in GUI-runner and as component of path to the test in console runner . The sname should not contain line breaks. It is better if the sname is short and without white spaces. |
fname | Full name of test is used as test name in console runner . The fname should not contain line breaks. The fname is placed in one line/screen. So it would be better if the fname is less than 60 symbols. |
descr | Full description of test. It can be as long as you need and contain any number of line breaks. The description can be shown in the console and GUI runner by special command only. |
|