Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

This plugin generates trend reports for the Testability Explorer, an open source program which uses byte-code analysis to look for testability pitfalls in Java code. 

Description

Testability Explorer is an open-source tool that identifies hard-to-test Java code. Testability Explorer provides a repeatable objective metric of "testability." This metric becomes a key component of engineering a social change within an organization of developers. The Testability Explorer report provides actionable information to developers which can be used as measure of progress towards a goal and a guide to refactoring towards a more testable code-base. Further information can be found here.

The Plugin

The following features are provided by this plug-in:

  • Configuration
    • Configuration of the XML report files to scan after a build.
    • Configurable threshold value at which a build will become unstable if your code's testability is beyond this number.
  • Trend reports
    • Overall testability cost for your project.
    • Number of excellent, good and poor testable classes in your project.
    • Detailed information how the testability cost is aggregated per class.

The current release is available in the download section. This plug-in is developed and maintained by Reik Schatz. Please use the Hudson mailing lists or the Testability Explorer mailing list to ask questions, create feature request or bug reports.

Installation

Download and install the plugin. Restart Hudson, then go to your project and click on Configure in the left menu.

Configuration

Check Publish Testability Explorer Report. Enter the correct path to your Testability Explorer report files. The path will be relative to your project root. The project root is usually where your build.xml (Ant) or pom.xml (Maven) file is located. Let's say as part of your build, you create the Testability Explorer report in reports/testability/result.xml, then the Report File Pattern for Hudson would have to be reports/testability/result.xml or reports/testability/*.xml if you want to use a Wildcard.

The Testability Threshold is a number value representing an overall testability cost. By setting a threshold, you define that your project code base must not have a higher testability cost than this number. If the testability cost is higher, the build will become unstable. As a rule of thumb, a good testability is below 100 but aim for a score below 50. The Hudson core project has more than 500 classes and a great testability score of just 22!

Reports

For each individual build you can review the testability scores. Click on a build in the left column then on the Testability Explorer Report icon in the screen center. This will bring up the report. You can see a summary which will show you the number of classes in your project and how many of them a excellent, good and poor testable. The total is the overall testability score for your project.

In the lower section you will find the 20 least testable classes in your project. You can click on a class to see an aggregation of what is causing the cost on a method level.

Changelog

Version 0.1
  • First version
  • No labels