Concordion is a simple, but powerful, agile acceptance testing tool for Java.

Logging Tooltip Extension

Introduction

This extension adds logging information unobtrusively to the Concordion output. The logging information is only displayed when hovering over the tooltip.

This allows us to reveal implementation details in the Concordion output, without obscuring the intent of the specification. For example:

Revealing the implementation detail can help to improve the level of trust in the tests, and sometimes highlights redundant steps in the tests. This is discussed further in this blog entry.

The extension captures the logging information from java.util.logging.

Configuration

Default Configuration

By default, this extension will capture all output from the root logger and disable console logging of the root logger.

To install the extension with default configuration, either annotate the fixture class with:

@Extensions(LoggingTooltipExtension.class)

or set the system property concordion.extensions to
org.concordion.ext.LoggingTooltipExtension

Custom Configuration

The extension can be customised to restrict the log output to named loggers, and by logging level. The output of logging to the console can also be enabled.

The easiest way is to use the @Extension annotation on an LoggingTooltipExtension instance field within the fixture class. For example:

    String loggers = "carbon.CarbonCalculatorTest, selenium.events";
    @Extension
    public ConcordionExtension extension = 
        new LoggingTooltipExtension(loggers, Level.FINE, false);

Specification

See also the logging tooltip specification.

Acknowledgements

Thanks to Trent Richardson for the CSS Tooltip implementation.