Skip to content
paissad edited this page Dec 4, 2018 · 7 revisions

Configuration

ReqCoCo can be used either executing 'runner' or the Maven plugin. Both options relies on the configuration file reqcoco.properties and some options to pass to the runner or Maven plugin. Here is a reqcoco.properties sample

How to declare a requirement

Requirements should be declared by using the tag @Req(....) Here is the syntax:

@Req(key1 = "value1", key2 = "value2", ...)

Here is the possible keys:

Key Use Default Value Description
id Required The unique identifier of the requirement
group Optional The logical group to which this requirement belongs to
version Recommended N/A The version to which this requirement belongs to
revision Recommended The revision of the requiement
summary Recommended Short description of the requirement
link Optional Link to some documentation related to the requirement

Example:

@Req(id = "req_001", group = "registration page", version = "1.0", revision = "r0", summary = "Verify user format validity")

@Req(id = "req_002", group = "registration page ", version = "1.0", revision = "r0", summary = "Verify user password strength")

@Req(id = "req_003", version = "2.0", revision = "r0", summary = "Verify login/user credentials")

Requirements must be declared in either:

  • A simple plain text file (whatever the format, .txt, .xml, .html, .java, .json, ...)
  • A Microsoft Word (.docx) file
  • A Microsoft Excel (.xslx) file
  • Redmine
  • Github

How to declare the status of a requirement for source or test code

  • Source Code --> @ReqSourceCode (key = "value", ...)
  • Test Code --> @ReqTestCode (key = "value", ...)

Possible values are:

Key Required Default Value Description
id Required The unique identifier of the requirement
version Recommended N/A The version to which this requirement belongs to.
revision Recommended The revision of the requiement
status Recommended TODO The status of the requirement (source or test). Possible values are: TODO, IN_PROGRESS, DONE, FAILED, IGNORE
comment Optional Additional comment related to the implementation or test of the requirement
author Optional Author of the implementation (developer or tester) of the requirement

Example:

@ReqSourceCode(id = "req_001", version = "1.0", revision = "r0", author = "John D.", status = "DONE", comment = "....")

@ReqTestCode(id = "req_001", version ="1.0", revision ="r0", author = "Julia Tester", status = "IN_PROGRESS", comment = "i have difficulties to finish the test ...")

ReqCoCo Runner Usage

java -jar reqcoco-runner.jar --help

ReqCoCo Maven Plugin

Example of configuration:

      <plugin>
        <groupId>net.paissad.tools.reqcoco.maven</groupId>
        <artifactId>reqcoco-maven-plugin</artifactId>
        <version>1.0.5</version>
        <executions>
          <execution>
            <phase>pre-site</phase>                
            <goals>
              <goal>report</goal>
            </goals>
            <configuration>
              <sourcelocation>/path/to/requirement/declarations</sourcelocation>
              <sourcetype>AGGREGATOR</sourcetype>
              <sourceCodePath>/path/to/source/code</sourceCodePath>
              <testCodePath>/path/to/test/code</testCodePath>
            </configuration>
          </execution>
        </executions>
      </plugin>