SourceForge.net Logo
prevtopnext
izh_test
    Kinds of tests
        Aggregate tests
iterate - Package of similar tests that differ only by parameters from a set (loop).

This kind of test is a package of test specified using one template and various values of substitution variables .

So test specification includes 3 parts:

  1. Test template.
  2. List of names for substitution variables .
  3. List of lists of values for substitution variables .
To read and build tests izh_test should iterate through the list of list of values and for each list of values add to package corresponded test.

Full specification of test looks like:
<iterate>
  <spec>
    <sname>short_name_of_test</sname>
    <fname>full name of test</fname>
    <descr>description of test</descr>
  </spec>
  <params>        .. named params              .. </params>
  <safe_params>   .. named params if undefined .. </safe_params>
  <names>
    <name>name_1</name>
    <name>name_2</name>
    ...
  </names>
  <tuples>
    <tuple>
      <value>value_1</value>
      <value>value_2</value>
      ...
    </tuple>
    <tuple>
      <value>value_3</value>
      <value>value_4</value>
      ...
    </tuple>
    ...
  </tuples>
  <tuple_groups> .. named groups of tuples .. </tuple_groups>
  <template>
    .. test description as template ..
  </template>
</iterate>

Where:
params, safe_params List of definitions of substitution variables for test components.
names List of names for substitution variables used in iteration.
name Name of substitution variable used in iteration.
tuples List of list of substitution variable values used in iteration.
tuple List of values for substitution variables used in iteration.

Number if items in this list should be equal to the number of names (items of list names).

item i in this list corresponds to item i in the list names.
valueValue of a substitution variable.
templateSpecification of test used as template for iteration.
tuple_groupsNamed group of lists of lists of values (see below).

Sometimes list of list of substitution variables can be so large that it is convenient to split the list in several named groups. It can be done using tuple_groups:
<tuple_groups>
  <tuple_group>
    <spec>
      <sname>test short  name  for group 1</sname>
      <fname>test full   name  for group 1</fname>
      <descr>test descr        for group 1</descr>
    </spec>
    <tuples> .. usual tuples as described above ..  </tuples>
  </tuple_group>
  <tuple_group>
    <spec>
      <sname>test short  name  for group 2</sname>
      <fname>test full   name  for group 2</fname>
      <descr>test descr        for group 2</descr>
    </spec>
    <tuples> .. usual tuples as described above ..  </tuples>
  </tuple_group>
  ...
</tuple_groups>
In this case special package of tests is built for each tuple_group. This package is included in the original iterate with specified for tuple_group names and is filled with tests by its values of substitution variables.

Identification specification spec is standard for all the tests:
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.

prevtopnext

SourceForge.net Logo