eclipse-testdoc-processor

Overview

The testdoc annotation processor is part of the Eclipse testdoc-plugin. It parses the test cases for UUT annotations and provides the information to build an index on the test cases and the business classes being tested.

The annotation processor uses the jdt-apt project to integrate with eclipse. On compilation of a Java source file the processor generates the relevant information to be shown by the test stories view.

Activating the Processor

Without the processor no test documentation is generated and the test stories view is empty.

To activate the annotation processor for a project, use the Activate Processor item from the TestDoc context menu of that project.

Shows the menu with activation/deactivation items

The activation enables the APT processing for the given project. The JDT-APT dialog shows the following configuration:

Shows the JDT-APT configuration view

The activation also adds the testdoc processor to the annotation processors of the project and activates it.

Shows the JDT-APT configuration view for the factory path

On deactivation the enabled state will be set to false. The name of the testdoc processor remains added.

Running the Processor

Since the testdoc processor is integrated into the compiler via the APT interface, it is run whenever compilation is executed. The extracted test documentation is written to the eclipse APT folder (defaulting to .apt_generated).

Please note that the processor only incrementally receives information about tests. Therefore make sure to run the processor by a manual build before working with the test stories view.

The testdoc project context menu provides an item to run the processor on the current page: Run Processor.

Shows the menu with 'Run Processor' item

This will run the build on the selected project and generate the test documentation required for the test stories view. In case you want to run the build on more than one project, the view provides an additional action (Run Processor on all Projects) to run the processor on all projects that have the testdoc processor activated.

Shows the menu with 'Run Processor' item