Reporting Coverage Analysis Results > Coverage Browser Report 

Coverage Browser Report

The Coverage Browser reports include a report header and a summary of the packages in the snapshot. You can choose to include progressively more detailed information about the packages, classes, and methods in the snapshot. By default, the report includes data on all code in all packages. You can choose to exclude some code from the report using report filters.

You can include the following report options:

Application Summary

Package Summary

Class Summary

Source Data

Report Filters

Application Summary

The Application Summary provides an overview of your application. For each package, it shows the total number of classes, methods, and lines of code and the percentage of each that were missed by your test suite. This summary is useful for communicating Coverage results to senior management.

Figure 1

Figure 1 Sample Coverage report header and application summary

Package Summary

The Package Summary breaks down the results in the Application Summary by package. For each class in a package, you get the total number of methods and lines of code in the package and the percentage of missed methods and lines. You can use this summary to get an overview of test case coverage. This summary is also useful as a management tool; you can assign classes with a high percentage of missed code to members of your team for further investigation.

Figure 2

Figure 2 Sample package summary

Class Summary

The Class Summary breaks down the results in the Package Summary by class. For each method in a class, you get the total number of lines of code in the method and the percentage of missed lines. A QA analyst might generate this report before investigating missed code and after modifying test suites. He can then use these reports to communicate before and after results to his manager.

Figure 3

Figure 3 Sample class summary

Source Data

You can add the source code to your report. For each method, the source code is displayed along with line numbers and whether or not the line was missed. This report is useful to have with you if you want to talk to a developer about a particular method. You may also find it useful for analyzing Coverage results away from the computer.

Figure 4

Figure 4 Sample source data

Report Filters

By default, the report includes data on all code in all packages in the snapshot. You can choose to exclude some code from the report using report filters.

To create a list of report filters:

1 Click an empty cell and enter the package, class, or method (no signature) in the cell. For more information, see the following subsection “Syntax for Filters.”

The first cell in the row indicates whether or not the filter is enabled.

2 Set the action to Include or Exclude the code from the report.

3 Add additional filters. If two filters refer to the same code, the filter lower in the table is used.

4 You can change your list of filters.

• To move a filter higher or lower in the table, drag the filter to its new location.

• To disable a filter, click the first cell in the row to change On to Off.

• To delete a filter, select the code, right-click, and select Delete.

Syntax for Filters

Filters are case-sensitive and blanks are not allowed. You can use an asterisk (*) as a wild card; it matches any character, including the package separator. If you specify the code in a shorthand or partial form, JProbe automatically changes it to canonical form. The change may not be exactly what you desire, so be sure to verify it. JProbe does not check to see whether the filter actually matches anything in your code. For example, if you make a typing error in your package name, nothing in your code will match the filter and so the filter is not applied.

The following table contains common syntax and describes how JProbe interprets it:

 

If you type this:

Canonical form is this:

And filters are applied to:

*
*.*.*()

All methods in all classes in all packages (including the unnamed package)

.*
.*.*()

All methods in all classes in the unnamed package only

C
*.C.*()

All methods in classes named C in any package

.C
.C.*()

All methods in the class named C in the unnamed package only

M()
*.*.M()

Method M in all classes in all packages

P.String*
P.String*.*()

All methods in any class in the package P whose name starts with String and all methods in any class in a package or subpackage of P.String* (matches both P.StringArt.draw() and P.Stringent.Check.English.
spelling()
)

P.*.C.do*()

no change

Any method whose name starts with do in any class named C in any subpackage of P, except P directly (matches P.SubPkg.C.doGet(), but does not match P.C.doNotMatch())

Pre*
*.Pre*.*()

All methods in all classes starting with Pre in any package, as well as any class in a subpackage whose name starts with Pre (matches both Pkg.Prepare.m() and Pkg.Pretend.C.m())

s*y
*.s*y.*()

All methods in classes whose name ends with y and either starts with s or belongs to a subpackage that starts with s (matches both java.rmi.server.RMISocketFactory,com.quest.say, and java.security.cert.X509CRLEntry)

foo.bar
foo.bar.*()

All methods in the class bar in package foo. This is likely not what you wanted. See the next example.

foo.bar.*
foo.bar.*.*()

All methods in all classes in foo.bar or any of its subpackages

foo.bar.
String.t*e()

no change

Methods whose names start with t and end in e in foo.bar.String (matches both toUpperCase() and toLowerCase())