Coverage file format » History » Version 2
Viktoria Kopach, 10/14/2014 06:16 PM
1 | 1 | Viktoria Kopach | h1. Format of the file that contains coverage info |
---|---|---|---|
2 | |||
3 | Coverage is described in XML. |
||
4 | |||
5 | <pre> |
||
6 | <?xml version="1.0" encoding="UTF-8"?> |
||
7 | <coverageInfo> |
||
8 | <reqcoverage qid="unique_id_of_requirement_or_test_purpose"> |
||
9 | <covered_by uri="path_to_covering_element" [hits="1"]/> |
||
10 | </reqcoverage> |
||
11 | <reqcoverage qid="unique_id_of_requirement_or_test_purpose"> |
||
12 | <covered_by uri="path_to_covering_element"/> |
||
13 | </reqcoverage> |
||
14 | <error [name="error_name"] testuri="uri_of_covered_by_element" [uri="link_to_error_description"]> |
||
15 | [<violates qid="unique_id_of_requirement_or_test_purpose"/>]* |
||
16 | [<description [format="error_description_format"]>error_description</description>] |
||
17 | </error> |
||
18 | </coverageInfo> |
||
19 | </pre> |
||
20 | |||
21 | Here: |
||
22 | |||
23 | Square brackets denote optional parameters. |
||
24 | |||
25 | - +*coverageInfo*+ - can be only one instance in the file. It contains multiple XML-elements *reqcoverage* (one or more) and *error* (can be absent, one or more). |
||
26 | |||
27 | 2 | Viktoria Kopach | - +*reqcoverage*+ - child-element for *coverageInfo*. Should be specified for every covered Requality-element. (Uncovered nodes are not specified at all.) Contains nested XML-elements *covered_by* (one or more). Every nested *covered_by* element should match one test procedure or test. *reqcoverage* element has attribute *qid*. |
28 | 1 | Viktoria Kopach | - +*qid*+ - is *user-visible-name(element)* or *qualifying-id(element)* of the covered element: |
29 | |||
30 | * *user-visible-name(element)* - is element name (if exists, i.e. if for this element name field in Properties view is not empty), |
||
31 | otherwise it is specified as user-visible-name(element.parent)/id, i.e. first specify user-visible-name of parent element, then specify element id (use ''/'' as delimeter). |
||
32 | For example: |
||
33 | "TR-FMF-01-01-002/TR-FMF-01-01-002_T01" |
||
34 | |||
35 | * *qualifying-id(element)* - is full path to the element beginning with root node (Requirements), ''/'' is used as a delimeter. |
||
36 | For example: |
||
37 | "Requirements/01/MyRequirement01" |
||
38 | |||
39 | 2 | Viktoria Kopach | - +*covered_by*+ - child element for *reqcoverage*. There could be several *covered_by* elements inside *reqcoverage*, it depends on how many test rocedures or tests cover corresponding Requality-element. Every *covered_by* element matches one covering Requality-element. *covered_by* has attributes: *uri* and *hits*. |
40 | 1 | Viktoria Kopach | - +*uri*+ - is attribute of *covered_by* XML-element, it specifies a path to the test described in this *covered_by*-element: |
41 | * if it is described a coverage of test purposes by test procedures then here *uri* is a path to test procedure step. |
||
42 | ** If test procedure is situated in the same project thep the path is specified without protocol, for example: |
||
43 | "/TestProcedures/01/TestStep04" |
||
44 | Here 01 - test procedure id, 04 - test procedure step number. |
||
45 | ** Если тестовая процедура находится в другом проекте Requality, то путь записывается следующим образом: |
||
46 | "requality://ProjectName/TestProcedures/01/TestStep04" |
||
47 | Здесь ProjectName - имя проекта, где находится тестовая процедура. |
||
48 | |||
49 | * если описывается покрытие тестовых ситуаций тестами, то это путь к тесту, например: |
||
50 | "file:///home/user/work/test1.c#12" |