In this section:
VersionOne is a popular browser-based platform for managing requirements and tracking issues. Parasoft DTP integrates with VersionOne, providing the following functionality:
- Ability to automatically update test results in VersionOne (see syncTestCases)
- Ability to automatically create defects and issues in VersionOne when DTP detects test failures (see syncTestFailures)
- Ability to manually create defects and issues in VersionOne from the Violations Explorer view
- Ability to manually create defects and issues in VersionOne from the Test Explorer view.
VersionOne assets include build and authorship information, as well as links back to the test or violation in DTP.
DTP includes an API for processing the test associations and sending the data to VersionOne. This enables you to automate this process so that, for example, you could add a job to your CI server that calls the API based on specific triggers in your environment.
You can associate multiple projects in DTP with a project in VersionOne, but you cannot associate the same DTP project with more than one VersionOne project.
This feature is currently in beta.
The following sections describe how to create the relationships between Parasoft and VersionOne artifacts.
Connecting DTP to VersionOne Server
- Choose Report Center Settings from the settings (gear icon) drop-down menu.
- Choose External Application [Beta] from the Administration sidebar and choose VersionOne from the Application Type drop-down menu.
- Enable the Enabled option.
- Enter a name for your instance of VersionOne in the Name field.
- Enter the VersionOne URL in the Application URL field.
- The Display URL field is rendered in DTP interfaces when links to your VersionOne system are created.
- Enter login credentials in the Username and Password field. The login must have sufficient privileges to create VersionOne issues in the projects specified in the Project Associations section.
- Click Test Connection to verify your settings and click Save.
Associating DTP Projects with VersionOne Projects
- Click Create Project Association and choose a project from the DTP Project drop-down menu in the overlay.
- Enter the name of a VersionOne project in the External Project field and click Create to save the association.
Click the trash icon to remove a project association. Removing the project association does not remove links. If a new association is created, existing links between violations and VersionOne issues will be reactivated.
Associating Parasoft Test Cases with VersionOne Work Items
VersionOne work items are assets that represent a story, defect, or test set. Add the
@test annotation and VersionOne test ID to the test code executed by your Parasoft tool to associate Parasoft tests with VersionOne tests. Add the
@req annotation and VersionOne story ID in the test code to associate Parasoft tests with VersionOne stories. Refer to your Parasoft tool documentation for details on adding associations and the VersionOne documentation for information about getting work item IDs.
You can make several associations, but VersionOne tests and tests executed by Parasoft have a one-to-one relationship. If multiple Parasoft tests are associated with a single VersionOne test, DTP will send results for the multiple tests to same VersionOne test.
Creating Defects and Issues
You can create defects and issues in VersionOne using the Test Explorer interface or call the API to them programmatically create them when tests fail. You can also create defects and issues associated with static analysis violations from the Violations Explorer. Additionally, if the VersionOne story is closed, DTP will still create the artifact, regardless of whether the API or UI is used.
"Issues" in VersionOne refer to assets that highlight items that require project-wide visibility. Issues can be represent anything that is impeding or might impede the project team's delivery. "Defects" are assets that identify a discrepancy between the expected and actual behavior of a completed feature. Defects can be scheduled into sprints/iterations the same way stories/backlog items are or, they can be tracked as a separate work queue outside of any sprint.
The following chart describes how assets are created in VersionOne:
|Associated with @req annotation||Associated with @test annotation|
Using Explorer Views
The Test Explorer and Violations Explorer views enable you to create issues and defects for any test and violation, respectively, regardless of status. Refer to the following sections for details on creating VersionOne assets in explorer views:
- Violations Explorer > Creating an Issue in a Third-party System
- Test Explorer > Creating an Issue in a Third-party Systems
Using the API
You will need the configuration ID associated with your VersionOne integration to use the API. After configuring your connection to VersionOne, the ID will appear in the URL off the External Applications screen.
The following API endpoints are available.
This endpoint adds or updates existing VersionOne tests that are associated Parasoft tests.
Execute your tests and send the reports to DTP.
- After DTP receives the results, send a POST method call the API:
DTP will process the report and send the data to VersionOne. The response will include the VersionOne tests that were created or updated with the test results data. The test results are ignored if DTP is unable to find the test requirement in VersionOne, which may occur if the incorrect
@req annotation is was added to the test code or if the item was deleted in VersionOne.
This endpoint create defects in VersionOne when DTP collects test failures associated with VersionOne tests. If a test fails for multiple builds, multiple defects will be created.
DTP will process the report and send the data to VersionOne. The response will include the failed tests and associated VersionOne tests.