Project

General

Profile

Actions

Format of the file that contains coverage info

Coverage is described in XML.

<?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>

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 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 inside reqcoverage, it depends on how many test procedures 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 then the path is specified without protocol, for example:
      "/TestProcedures/01/TestStep04"
      Here 01 - test procedure id, 04 - test procedure step number.
    • If test procedure is situated on the other Requality project then path looks like:
      "requality://ProjectName/TestProcedures/01/TestStep04"
      Where ProjectName is a name of the project where test procedure is situated.
  • if it is described a coverage of test purposes by test then here uri is a path to test. For example:
    "file:///home/user/work/test1.c#12"

- hits - attribute of covered_by XML-element, it is optional. Indicates how many times this reqcoverage requirement is linked to in covered_by test.

- error - element to describe error resulting from the test. Includes one description element with error description. Includes one or more optional violates elements if it is possible to define which exactly requirements are violated by this error. error element has attribute testuri and two optional attributes: name and uri.
- testuri - path to test described in covered_by element
- name - optional parameter, it is used to show displayed error name. If error name is not defined then "error"+error_index_number is used as name.
- uri - optional parameter, path to file with more information about the error.

- violates - optional element, corresponds to requirement that is violated by the error.Every violates element corresponds to one violated requirement. violates element has attribute qid. If violates is not defined the error will not be shown in a report.
- qid - is user-visible-name(element) or qualifying-id(element) of covered element(for more details see description of reqcoverage element above).

- description - optional element, text description of the error. Has optional format attribute.
- format - format of error description. Can be "html" or "plain". In case of "plain" all html tags will be shown as plain text.
- error_description is a text of error description. For "html" format it is allowed to use html tags for text formatting.

Example of file that contains coverage info:

<?xml version="1.0" encoding="UTF-8"?>
  <coverageInfo>
    <reqcoverage qid="TR-FMF-01-01-001/TR-FMF-01-01-001_T02">
      <covered_by uri="/TestProcedures/01/TestStep05" hits="1"/>
    </reqcoverage>
    <reqcoverage qid="TR-FMF-01-01-001/TR-FMF-01-01-001_T01">
      <covered_by uri="/TestProcedures/01/TestStep03" hits="1"/>
    </reqcoverage>
    <reqcoverage qid="TR-FMF-01-01-001">
      <covered_by uri="/TestProcedures/01/TestStep01" hits="1"/>
    </reqcoverage>
    <reqcoverage qid="TR-FMF-01-01-002/TR-FMF-01-01-002_T01">
      <covered_by uri="/TestProcedures/01/TestStep02" hits="1"/>
    </reqcoverage>
    <reqcoverage qid="TR-FMF-01-01-006">
      <covered_by uri="/TestProcedures/01/TestStep04" hits="1"/>
    </reqcoverage>
  </coverageInfo>

Updated by Viktoria Kopach over 9 years ago · 9 revisions