In this section:
Introduction
Test Impact Analysis determines the subset of tests which should be re-run based on the code changes between the baseline and target builds. By leveraging Test Impact Analysis, your development and QA teams can save time by running only the impacted tests.
Requirements
In order to perform test impact analysis, DTP needs the following:
- For the baseline build:
- test data
- coverage data
- For the target build:
- coverage data
Static coverage data is required. Runtime coverage data is not sufficient.
Installation
The assets that enable Test Impact Analysis are installed as part of the Process Intelligence Pack installation. Refer to the Process Intelligence Pack installation instructions for details. After installing the flow, deploy the report to your DTP environment.
- If you have not already done so, install the Process Intelligence Pack.
- Open Extension Designer and click the Services tab.
- Expand the Process Intelligence Engine service category. You can deploy assets under any service category you wish, but we recommend using the Process Intelligence Engine category to match how Parasoft categorizes the assets. You can also click Add Category to create your own service category (see Working with Services for additional information).
- You can deploy the artifact to an existing service or add a new service. The number of artifacts deployed to a service affects the overall performance. See Extension Designer Best Practices for additional information. Choose an existing service and continue to step 6 or click Add Service.
- Specify a name for the service and click Confirm.
- The tabbed interface helps you keep artifacts organized within the service. Organizing your artifacts across one or more tabs does not affect the performance of the system. Click on a tab (or click the + icon to add a new tab) and choose Import from the vertical ellipses menu.
- Choose Local > Flows > Workflows > Process Intelligence > Test Impact Analysis and click Import.
- Click anywhere in the open area to drop the artifact into the service.
- Click Deploy to finish deploying the artifact to your DTP environment.
- Return to DTP and refresh your dashboard. You will now be able to add the related widgets.
Adding and Configuring the Widget
The Test Impact Analysis slice ships with the Impacted Tests - Summary widget under the Process Intelligence category. This widget shows the number of tests from the baseline build that cover modified methods in the target build. See Adding Widgets for details on adding widgets.
Title | You can change the default title of the widget. |
---|---|
Filter | Choose a filter from the menu. A filter is a collection of test execution and code analysis metadata configurations that enables DTP to aggregate, subset, and analyze specific swathes of data. |
Period | Choose a range of time or number of builds to set as the scope. |
Baseline Build | The build that you want to compare to the target build. |
Target Build | The build you want to analyze. Typically, this is the latest build. |
Coverage Image | Coverage images are identifiers for the coverage data associated with a test run. The filter must be set to the correct coverage image to present information. |
Impacted Tests - Summary Widget
The Impacted Tests - Summary widget shows the number of impacted tests over the total number of tests analyzed as well as the dates of the baseline build and the target build.
Troubleshooting
If there are any issues with the data, the widget will print an error describing the problem.
To address the errors:
- Verify that the coverage information is accessible (see Requirements).
- Verify that the filter has a coverage image associated with it (see Associating Coverage Images with Filters).
- Verify that the correct coverage image was selected when you added the widget (see Widget Configuration).
Exploring the Results
Click on any part of the widget to drilldown to the Impacted Tests report.
You can click on individual tests to drill down to the Test Explorer.