This topic explains how to view C/C++test results and customize their presentation.
Results from testing performed in the GUI can be reviewed:
Results from testing performed in the command line can be reviewed in C/C++test reports (see Generating Reports in the Command Line). If publishing results to DTP is enabled, results sent to DTP can be imported into your IDE, where you can review them via C/C++test views. See Generating Reports in the Command Line and Importing Results into the UI for details.
Results from testing performed in the GUI can be accessed via the Test Progress view. The view allows you to first monitor the progress and status of the process, then access the results and review the report. To manually open the view, go to Parasoft> Show View> Test Progress. When the test is run, the label of the view is changed to indicate which test configuration is run. In the following example, the Test Progress view shows the status of a built-in test configuration "Recommended Rules".
Click the Review tasks button to display the results in the Quality Tasks view.
Click the Generate Report button to open the Report & Publish dialog.
The Report & Publish dialog allows you to configure your report preferences. See Generating Reports for details.
Your assigned quality tasks generated during interactive testing or imported from command-line tests are shown in the Quality Tasks view. If this view is not available, choose Parasoft> Show View> Quality Tasks to open it. To see additional details, drill down into the Quality Tasks view tree. To toggle through the items reported in this view, use the arrow buttons in the view’s toolbar.
The results are presented as a task list that helps you determine how to proceed with testing and code improvement. Tasks are organized by author, category, then by severity (if assigned). Severity levels range from 1 to 5— Severity 1 tasks are estimated to have the greatest chance of eliminating or preventing a critical bug, while Severity 5 tasks are estimated to have the least chance of eliminating or preventing a critical bug.
For tests that were run on source files, results are also reported at the source code level.
If you open the editor for a tested source file, markers will be placed next to the source code responsible for problems found. For static code analysis violations, markers are placed next to the line of code responsible for the violation. For unit test errors, markers are placed on the first line of the stack trace that matches the tested class. For unit test failures or for errors where the tested class is not known, markers are placed on the first line of the stack trace that matches the unit test class. To learn what problem a particular marker indicates, place your mouse over the marker and review the information in the popup window. Or, to go directly to the related Quality Tasks view message, right-click the source code responsible for the problem, choose Show In> Quality Tasks (for Eclipse) or Parasoft> Show in Quality Tasks
To see testing details, open the Console view during test execution. Testing details are reported here when a test is in process, and remain there until they are cleared or until another test is run.
The Test Case Explorer indicates the status of all available test cases. Red is used to mark the complete path to a failure.
To view tasks related to a test listed in the Test Case Explorer, right-click that test’s Test Case Explorer node, then choose Show in Tasks. This will display tasks related to that test will then the Quality Tasks view.
Many tree nodes report the line number at which an error or possible problem occurred. To view the related code, double-click the node that shows the line number, or right-click that node and choose Go to from the shortcut menu. The related editor will then open and highlight the designated line of code.
See About the Test Case Explorer for details about Test Case Explorer.
There are several ways to customize the results display to preferences and needs for reviewing quality tasks.
By default, the Quality Tasks view shows cumulative results for all tested resources. For example, if you imported results to your IDE, and then ran two tests from the GUI, the Quality Tasks view would show all imported tasks, plus all results from the subsequent two tests. You can filter results to only display results from the last test session or selected resources.
If you prefer to see only results from the last test session or from selected resources, you can filter results.
You can change the Quality Tasks view’s format and contents by:
There are several available layout templates:
To select the layout best suited to your current goal:
Open the pull-down menu on the top rightof the Quality Tasks view.
To customize one of these preconfigured layouts:
To add a new layout template:
To re-order, hide, and remove categories directly from the Quality Tasks view:
In the Quality Tasks view, C/C++test results are presented as a task list that helps you determine how to proceed in order to ensure the quality of your system.
Tasks are organized into the following categories:
For details on how to explore and address errors reported for a specific type of analysis, see the following topics:
For any task reported in the Quality Tasks view, you can open the test configuration which caused that task to be reported. This is particularly useful if:
To view the test configuration that caused a specific task to be reported, right-click that task, then choose View Test Configuration. This will open the appropriate test configuration and go directly to the test configuration options that are related to the given task. For instance, if a static analysis task was selected, the Static tab will be opened and the corresponding rule will be highlighted.
You might want to clear messages from the Quality Tasks view to help you focus on the findings that you are most interested in. For example, if you are fixing reported errors, you might want to clear each error message as you fix the related error. That way, the Quality Tasks view only displays the error messages for the errors that still need to be fixed.
Messages that you clear will only be removed temporarily. If the same findings are achieved during subsequent tests, the messages will be reported again.
You can clear individual messages, categories of messages represented in the Quality Tasks view, or all reported messages.
To clear selected messages shown in the Quality Tasks view:
The selected messages will be removed from the Quality Tasks view.
To clear all messages, click the Delete All icon at the top of the Quality Tasks view.
The Quick Fix (R) feature can be used to automate actions commonly performed while reviewing and responding to unit test findings. Any finding that has a Quick Fix is marked with a yellow lightbulb icon. To automatically fix a problem marked with this icon, right-click the part of the message marked with the Quick Fix icon, then choose one of the available Quick Fix commands (marked with yellow lightbulb icons) from the shortcut menu.
For details about using Quick Fix for unit test results, see Using Quick Fix (R) to Respond to Test Execution Findings.