Format.md 1.76 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
<!--
This file is part of the Test-Comp test format,
an exchange format for test suites:
https://gitlab.com/sosy-lab/software/test-format

SPDX-FileCopyrightText: 2018-2019 Dirk Beyer <https://www.sosy-lab.org>

SPDX-License-Identifier: Apache-2.0
-->

Thomas Lemberger's avatar
Thomas Lemberger committed
11 12 13 14 15 16 17 18 19 20 21
# Exchange Format for Test Suites

The goal of the exchange format is to facilitate
easy information exchange between different
automatic test-case generation tools
and towards test-case executors.
The format should allow users to specify test cases
in a both human- and machine-readable format that can be easily reused.

### Format

22 23 24 25 26 27 28 29
The format consists of multiple files that describe
metadata and test cases.
The format expects one file `metadata.xml` for the metadata,
and an individual file with an arbitrary name `*.xml` for each test case.
The metadata format is described by [test-metadata.dtd](../test-metadata.dtd).
The test-case format is describd by [testcase.dtd](../testcase.dtd).
All files should be in the same directory.
Examples can be found [here](../examples/).
Thomas Lemberger's avatar
Thomas Lemberger committed
30

31 32 33 34 35 36 37
#### Semantics of a test case
Each test case consists of a sequence of `input` tags
that describe a test vector:
The first element of the test vector is the content of the first `input`
tag,
the second element of the test vector is the content of the second `input`
tag, and so on.
38

39 40
It is possible to specify two additional, optional information:
(1) the input type, which must be parsable as a C type in the corresponding program, 
41 42
and (2) the input variable through which the input is received.
If an input variable is specified, and the sequence of `inputs`
43 44
does not fit that information, the interpretation is undefined.

Thomas Lemberger's avatar
Thomas Lemberger committed
45 46
### Builder

47
The python module `tsbuilder` with class `tsbuilder.Builder` can be used
Thomas Lemberger's avatar
Thomas Lemberger committed
48
to create test-format xml files programmatically.