Hapa’o - Test coverage

Hapa’o: to take care, keep (someone or something) safe and provided for

Hapa’o (also written Hapao) is a test coverage tool that use an appealing visual representation to render a coverage.

The Hapa’o website (http://hapao.dcc.uchile.cl/) contains screenshots, a screencast and an extended documentation. A wizard is accessible from the World Menu.

A number of facilities are provided to programmatically assess the coverage. The following expression profiles the execution of the unit tests of all the packages that constitute Mondrian:

profile := HapaoTestCoverage runTestsForPackagesMatching: 'Mondrian\*'

This expression generates the following picture (click on it to zoom in):

The coverage for each class and methods is accessible using accessors:

(profile >> #MOGraphElement) coverage  "--> 84.69%".
(profile >> #MOGraphElement >> #absoluteBounds) coverage  "--> 100%"

The test blueprint is opened with:

profile visualize

It visually qualify and quantify the coverage of Mondrian’s tests.

Each outer box is a class. Edges are superclass link between classes. A superclass is above its subclasses.

Inner boxes are methods. The height of a method is the number of lines of code. The width of a method is the number of different receivers the method has been executed on. Its color is the number of executions (black = it has been executed many times).

White boxes with red border are methods that haven’t been executed.

Authors: Vanessa Peña, Alexandre Bergel