You can enable traceability from Selenium tests to work items in your application lifecycle management (ALM) system and report the data to Parasoft DTP. This provides visibility into how well software requirements are covered by tests. In this section:
<dependency> <groupId>com.parasoft</groupId> <artifactId>parasoft-annotations</artifactId> <scope>test</scope> <version>1.0</version> </dependency> |
You can also refer to the Parasoft Annotations project on GitHub, which includes the JavaDoc API documentation.
Use the @WorkItem
annotation in your test methods and classes to correlate the test with work items in your ALM. Annotations include the ID of the work item, type of work item, and a URL to the work item in the ALM (optional). The following table describes WorkItem
properties:
Property | Description | Required |
---|---|---|
type | Specifies the type of work item in the ALM to associate with the test. Valid values:
Example:
| Required |
id | Specifies the ID of the work item in the ALM. The type and number of characters vary acrosss ALMs. Example:
| Required |
url | Specifies the URL of the work item in the ALM. The purpose of the URL parameter is to provide additional information for test reviewers. It is not used for any Selenic functionality. Example:
| Optional |
import com.parasoft.annotations.WorkItem; import static com.parasoft.annotations.WorkItem.Type.*; @WorkItem(type=REQ, id="REQ-123", url="https://server.myALM.com/") @WorkItem(type=REQ, id="REQ-124", url="https://server.myALM.com/") public void myFunction() { . . . } |
Execute your tests with Selenic after adding WorkItem
annotations:
The annotations will be included in the test results sent to DTP where they can be processed and included in DTP's reporting mechanisms.
Refer to the Parasoft DTP documentation for information about viewing test data in DTP dashboards and widgets.