|
The aggregate tests are tests which consist of other tests. They allow joining number of test in large packages and test them at once as one thing.
Therefore this level allow to define special named things which can be used in internal tests
If number of the named things is too large or you want to use them several times from different files with description of test then such declarations can be splitted to separated file and you can include them using construction include/declarations_from
Also, here you can describe standard actions, that should be executed before and after each terminal test included in the aggregate test .
Substitution variables define text values for variables, which can be used later in fields of test specifications like %name_of_variable%.
They are defined usually via special specification in an aggregate test:
<params> <par> <name>variable_name1</name> <value>variable value1</value> </par> <par> <name>variable_name2</name> <value>variable value2</value> </par> .... </params> |
params | List of definition for substitution variables. |
par | Definition for substitution variable. |
name | Name of substitution variable. |
value |
Value of substitution variable.
It can include other substitution variables. In that case real value is calculated from variables defined rather. |
Also substitution variables can be defined via next specification:
<safe_params> <par> <name>variable_name1</name> <value>variable value1</value> </par> <par> <name>variable_name2</name> <value>variable value2</value> </par> .... </safe_params> |
Values for these variables are defined only if they weren't defined rather (on the previous level of aggregate test i.e. in the test that includes this test as a component) and it's only difference with previous specification.
Specification of the test usually can include params and safe_params at the same time.
Templates of test are named definitions of tests. To run these tests special construction should be written: call_template . All the substitution variables used to specify the test are assigned by values depending on the place of using the template.
They are defined usually via special specification in an aggregate test:
<test_templates> <template> <name>template_name1</name> <test> template description 1 </test> </template> <template> <name>template_name2</name> <test> template description 2 </test> </template> .... </test_templates> |
test_templates | List of definition for named test templates. |
test_template | Definition for named test template. |
name | Name of defined named test template. |
test |
Specification of the test.
Can include substitution variables as part of its fields. In such case these variables calculates depending on the place of using the template ( call_template ). |
Standard actions before starting and after stopping of terminal test. Usually these actions are used for doing some preparations like filling test data.
Any actions for test_script can be used in these sections.
These actions are defined in aggregate test using next conatruction:
<on_start_terminal> .... test commands .... </on_start_terminal> <on_stop_terminal> .... test commands .... </on_stop_terminal> |
on_start_terminal | Actions that should be executed before each terminal test in this aggregate test. |
on_stop_terminal | Actions that should be executed after each terminal test in this aggregate test. |
If you describe several constructions on_start_terminal on different levels of aggregate tests then these actions are executed begining from higher leverl. Contructions on_stop_terminal are executed begining from lower level.
Including declarations written in another file. This construction is used usually if number of named things in aggregate test is too large or these things should be used in different tests.
The constructions defined using next syntax:
<include> <declarations_from>name of file with declarations</declarations_from> .... </include> |
include | Section contained names of included files. |
declarations_from |
Name of file that contains declarations.
Path to the file should be relative from directory where original file is located. |
File with declarations has simple format:
<declarations> <test_templates> .. named test templates .. </test_templates> <params> .. named params .. </params> <safe_params> .. named params if undefined .. </safe_params> <include> .. files with declarations .. </include> </declarations> |
Where:
test_templates | Definitions of named test templates for using in test component. |
params, safe_params | Definitions of substitution variables for using in test component. |
include | List of included files files with declarations . |
<package> <spec> <sname>test short name for package</sname> <fname>test full name for package</fname> <descr>test descr for package</descr> </spec> <test_templates> <template> <name>b</name> <test> <empty_test> <spec> <sname>test short name for empty</sname> <fname>test full name for empty</fname> <descr>test descr for empty</descr> </spec> </empty_test> </test> </template> </test_templates> <on_start_terminal> <echo>######## on start</echo> </on_start_terminal> <on_stop_terminal> <echo>######## on stop</echo> </on_stop_terminal> <params> <par> <name>test_name1</name> <value>test_value1</value> </par> <par> <name>test_name2</name> <value>test_value2</value> </par> </params> <safe_params> <par> <name>test_name3</name> <value>test_value3</value> </par> <par> <name>test_name4</name> <value>test_value4</value> </par> </safe_params> <include> <declarations_from>test_declarations1.iti.xml</declarations_from> <declarations_from>test_declarations2.iti.xml</declarations_from> </include> </package> |
|