Coverage file format » History » Revision 2
Revision 1 (Viktoria Kopach, 10/14/2014 06:13 PM) → Revision 2/9 (Viktoria Kopach, 10/14/2014 06:16 PM)
h1. Format of the file that contains coverage info Coverage is described in XML. <pre> <?xml version="1.0" encoding="UTF-8"?> <coverageInfo> <reqcoverage qid="unique_id_of_requirement_or_test_purpose"> <covered_by uri="path_to_covering_element" [hits="1"]/> </reqcoverage> <reqcoverage qid="unique_id_of_requirement_or_test_purpose"> <covered_by uri="path_to_covering_element"/> </reqcoverage> <error [name="error_name"] testuri="uri_of_covered_by_element" [uri="link_to_error_description"]> [<violates qid="unique_id_of_requirement_or_test_purpose"/>]* [<description [format="error_description_format"]>error_description</description>] </error> </coverageInfo> </pre> Here: Square brackets denote optional parameters. - +*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). - +*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 *reqcoverage*-element has attribute *qid*. - +*qid*+ - is *user-visible-name(element)* or *qualifying-id(element)* of the covered element: * *user-visible-name(element)* - is element name (if exists, i.e. if for this element name field in Properties view is not empty), 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). For example: "TR-FMF-01-01-002/TR-FMF-01-01-002_T01" * *qualifying-id(element)* - is full path to the element beginning with root node (Requirements), ''/'' is used as a delimeter. For example: "Requirements/01/MyRequirement01" - +*covered_by*+ - child element for *reqcoverage*. There could be several *covered_by* elements *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*. - +*uri*+ - is attribute of *covered_by* XML-element, it specifies a path to the test described in this *covered_by*-element: * if it is described a coverage of test purposes by test procedures then here *uri* is a path to test procedure step. ** If test procedure is situated in the same project thep the path is specified without protocol, for example: "/TestProcedures/01/TestStep04" Here 01 - test procedure id, 04 - test procedure step number. ** Если тестовая процедура находится в другом проекте Requality, то путь записывается следующим образом: "requality://ProjectName/TestProcedures/01/TestStep04" Здесь ProjectName - имя проекта, где находится тестовая процедура. * если описывается покрытие тестовых ситуаций тестами, то это путь к тесту, например: "file:///home/user/work/test1.c#12"