Skip navigation links
org.netbeans.modules.junit/2 2.98

JUnit Tests
Under Development

See: Description

JUnit Tests 
Package Description
org.netbeans.modules.junit.api  
org.netbeans.modules.junit.plugin  

The module supports some aspects of JUnit-based testing.

There is no client API.

There is a support API (SPI) for a project-type-specific implementation of JUnit:
org.netbeans.modules.junit.plugin This SPI describes services provided by the custom JUnit support plugin which are not desribed by the existing public SPI (UnitTestForSourceQuery). This SPI represents an additional source of information for the JUnit module and allows a custom test-skeleton generator to be plugged. JUnit-plugin-lookup The object implementing the JUnitPlugin interface is taken by the JUnit module from the current project's lookup, the same way as the UnitTestForSourceQuery.

See the diagram:
diagram – the SPI provides an additional source of information

What is New (see all changes)?

Use Cases

The SPI allows to plug a project-type-specific implementation of JUnit support into NetBeans. The current NetBeans implementation only supports JUnit on J2SE project types. The SPI describes services provided by the custom JUnit support plugin.

The functionality to be plugged in comprises:

  • generation of test skeletons
  • navigation between source classes and corresponding test classes

For navigation, the plugin defines mapping between source classes and the corresponding test classes (both directions). Thus it provides an additional information to the information provides by UnitTestForSourceQuery

For generation of test skeletons, the plugin actually defines the whole test skeleton generator - it generates one or more test files for a given source file.

Exported Interfaces

This table lists all of the module exported APIs with defined stability classifications. It is generated based on answers to questions about the architecture of the module. Read them all...
Group of java interfaces
Interface NameIn/OutStabilitySpecified in What Document?
org.netbeans.modules.junit.pluginExportedUnder Development

This SPI describes services provided by the custom JUnit support plugin which are not desribed by the existing public SPI (UnitTestForSourceQuery). This SPI represents an additional source of information for the JUnit module and allows a custom test-skeleton generator to be plugged.

Group of lookup interfaces
Interface NameIn/OutStabilitySpecified in What Document?
JUnit-plugin-lookupExportedUnder Development .../modules/junit/plugin/JUnitPlugin.html

The object implementing the JUnitPlugin interface is taken by the JUnit module from the current project's lookup, the same way as the UnitTestForSourceQuery.

Implementation Details

Where are the sources for the module?

The sources for the module are in the Apache Git repositories or in the GitHub repositories.

What do other modules need to do to declare a dependency on this one, in addition to or instead of a plain module dependency?

Nothing.

Read more about the implementation in the answers to architecture questions.

Skip navigation links
org.netbeans.modules.junit/2 2.98