In this section:
You can configure
Jtest |
to associate tests with a broad range of development artifacts, such as requirements, defects, tasks, and feature requests.
To successfully associate unit tests with artifacts, you need to:
Use the tags in the
Javadoc. |
Set the report.associations
property to true
to enable associations with artifacts. This also enables/disables test associations in the HTML report.
report.associations=true |
The following tags for artifact types are associated by default when report associations is enabled:
You can use the issue.tracking.tags
property to define any number of additional tracking tags. Separate tags names with a comma:
issue.tracking.tags=tag1,tag2,tag3 |
You enable generating a link to the association in the HTML report by configuring the report.assoc.url.tag{n}
option:
report.assoc.url.tag1=[URL] |
URLs can contain [%ID%]
or ${id}
variables, which will be replaced by issue identifiers. For example:
report.assoc.url.tag1=http://bugzilla.company.com/show_bug.cgi?id=[%ID%] |
You can enable or disable showing test details in the HTML report:
report.contexts_details=[true | false] |
The report.contexts_details property must be set to true to enable showing associations.The product’s property file is preconfigured to enable showing test details.
See Report Settings for additional information.
Using Javadoc TagsUse Javadoc tags to associate unit tests with artifacts. Place the tag in the Javadoc to associate it with your tests. The tags used in the Javadoc should be preceded by a @ character.
You can also associate a tag with a class. As a result, it will be associated with all the tests within this class. In the following example, tag 9876 is associated with both tests within the Test class, whereas tag 111 is associated only with the testSomething2 test:
Multiple AssociationsYou can associate one tag with more than one artifact. Separate multiple associations with a comma that is not followed by a space character.
If you separate the tasks with a comma and a white space, the test will be associated only with the first listed artifact. In the following example, the test is associated only with task 1234:
|