Working with report request
To create a report request
- On the activity bar, click the DevX Code Coverage icon.
- Click Create Report Request
.
The Code Coverage Report Request page is displayed. On the General tab:
Field
Description
Report request name
Enter a name for the report.
Host
From the host list, select a host.
Repository
From the repository list, select a repository or click Find to browse the repository for creating Code Coverage reports.
Summary level
Select an option to determine how data in the repository should be summarized:
- Systems — Displays the summary information about all systems contained in the repository.
- Test IDs — Indicates the effectiveness of individual tests within a system and how completely the tests have tested each system. The Test IDlevel gives the system name, test ID, and program of all programs in the repository. The load module and user ID are ignored. Each system can have multiple test IDs, and each test ID can have multiple programs. Programs with the same test ID and system name are merged.
- Users — Indicates how much testing each user has done. It gives the system name, user ID, and program for all programs in the repositories. The load module and test ID are ignored. Programs with the same user ID and system name are merged.
- Load Modules —Displays code coverage results for all load modules in the repositories. Code coverage results are merged for all programs in load modules with the same name—regardless of the system, test ID, or user ID. This is helpful when the same load module is used by several systems, and the user wants to know the code coverage results regardless of the system that ran it.
- Programs —Displays code coverage results for all programs contained in the repositories. It merges code coverage results for runs of a program that have the same compiled data and time, regardless of the systems, load modules, test IDs, and user IDs from which they were run.
Combine altered debug sessions with unaltered sessions
Select the Combine altered debug sessions with unaltered sessions checkbox to merge debug and non-debug results, or clear it to leave debug and non-debug results as separate entries in the Code Coverage report.
Select the Criteria tab and select one of the following tabs:
Field
Description
Specify names
Enter any system, test ID, user ID, load module, and program names to retrieve only the data that matches the criteria. It is not necessary to complete all of the fields. You may use wildcards as a suffix. Leaving all fields blank retrieves all data.
Specify a list
From the Type list, select a type, and then select items from the list showing all items for the selected type present in the selected repository.
On the Filter tab, you can perform the following tasks:
Purpose
Action
Apply existing filters to the report
In the Search field, enter the filter name and select the filter.
Create a new filter
- Click Add.
- In the Add Filter dialog box, specify the following options:
- In the Type field, select the filter type.
- In the Scope field, select the scope type.
- In the Begin mask field, enter the mask details:
- For a line mask, type the text string to search for in the Begin mask field, the starting column position in the Start field, and the ending column position in the End field.
- For a block mask, enter the starting text string to search for in the Begin mask field, enter the ending text string in the End mask field, and enter the starting and ending column positions to search.
- In the Match criteria field, select the matching option to use:
- Within start/end range — Finds the text string anywhere it occurs between the start and end columns.
- Exactly at start position — Finds the text string when it starts at the starting column position.
- Whole word — Optional) Finds the text string of a line mask only when it occurs as a whole word, not when it is embedded within other words. This option only applies to line masks.
- Click OK to save the filter.
Edit a filter
- Right-click the added filter in the table and click Edit.
- Edit the required field and click OK.
Remove a filter
Right-click on the added filter in the table and click Remove.
Click OK. The newly created filter is added to the list.
Click the Location tab, and select the report location where you want to save the report. By default, the User option is selected.
- Click Run to view the report or Save to save the report. The Code Coverage Report: <report name> page is displayed when you click Run.
The screenshot shows see the risk metric that helps identify the programs with the highest failure risk if they are not thoroughly tested. The risk metric does not indicate how well the code has been tested because there is no way to know whether the proper input data was used. Therefore, the risk metric is never zero.
The risk factors used in Code Coverage are described in the following table. The factors listed in decreasing
order of importance.The number in the Risk column Risk factors exist in the program Details 800 or more Unexecuted critical verbs Indicates that at least one unexecuted critical statement is present. 400 - 599 Executed critical verbs Indicates that critical statements are present, all of which were executed 1 - 199 Unexecuted code
Program complexityIndicates that no critical statements are present. The ranges listed in the table above can be used to identify which of the risk factors are present in each program. A count above 800 indicates that at least one unexecuted critical line is present. How high the count is above 800, depends on what other risk factors are present. When determining which programs have the highest risk, understand that a program with a higher count than another is not necessarily riskier when both are in the same range (for example, if one program has a count of 801 and another has a count of 856).
The unexecuted code is the higher of: (1) the percentage of verbs unexecuted or (2) the percentage of branches unexecuted.
To view Annotation Listing
- Click on the program or right-click and select View Annotation Listing to view the annotations data related to the selected program. The ANNOTATIONS tab is displayed with the annotation data. You can filter the annotation data as required. You can also see the color-coded annotation listing in the program.
- Green color: Executed status
- Red color: Unexecuted status
- Yellow color: Partially executed status
- You can see the following filter icons in the annotation listing if filters are applied.
: Exclude
: Critical
: Exclude and critical
To view a Printer-Friendly Annotation Listing
- Click on the program or right-click and select View Printer-Friendly Annotation Listing. The View Printer-Friendly Annotated Listing Options tab displays the following print types so that you can filter the annotation data when printing.
- All: Select All to print the entire report and select the following options as required.
- Starting at line: Select Starting at line to print a report from that line forward.
- Line range: Select Line range and enter a start line and end line to print only those lines of the report.
You can select the following options while selecting the print type.
- Select Include highlighting to print a report that shows the highlighting displayed in the Annotated Listing.
- Select Include program information to print a report showing the program, system, load module, test, user, language, repository information used, and debug and optimized indicators.
- Select Include annotations legend to print a report that contains a legend explaining the annotations used in the report.
- Select Include statement numbers to print a report that lists statement numbers.
- Click OK to view the printable report. You can also view the ANNOTATIONS listing table.
To export annotation listing to PDF
- Click on the program or right-click and select Export Annotated Listing to PDF. The Export Printer-Friendly Annotated Listing Options tab displays the following print types so that you can filter the annotation data when printing.
- All: Select All to export the entire report and select the following options as required.
- Starting at line: Select Starting at line to export a report from that line forward.
- Line range: Select Line range and enter a start line and end line to export only those lines of the report.
You can select the following options while selecting the print type.
- Select Include highlighting to export a report that shows the highlighting displayed in the Annotated Listing.
- Select Include program information to export a report showing the program, system, load module, test, user, language, repository information used, and debug and optimized indicators.
- Select Include annotations legend to export a report that contains a legend explaining the annotations used in the report.
- Select Include statement numbers to export a report that lists statement numbers.
- Click Export to export the printable report.
To edit a report request
- Right-click on the report request and click Edit. The Code Coverage Report Request page displays all the report request details you entered while creating the report request.
- Edit the fields as required in the General, Creteria, Filters, and Locations tabs.
In the Locations tab, you can perform the following actions:- If you are inside the workspace and have created a report request under workspace settings, you can see an option to move the report request to User settings.
- If you are not inside any workspace and have created a report request under User settings, you won't see any option to edit the location.
- If you are inside the multi-root workspace and have created a report request under a specific folder, you can move the request to another multi-root folder or user settings.
- Click Save to save your changes.
To duplicate a report request
- Right-click on the report request and click Duplicate. A copy of the selected report is created with the name <report request>1.
The duplicate report request is added to the same location where the original report request was created.
To delete a report request
- Right-click on the report request and click Delete. You see a confirmation message to delete the report request.
- On the confirmation message click Yes to delete the report request.