Module org.junit.platform.configuration.processor


module org.junit.platform.configuration.processor

Annotation processor to generate machine-readable configuration parameter documentation.

The annotation processor all configuration parameters marked with ConfigurationParameter to "META-INF/junit-platform-configuration-metadata.json" in Spring Boot's Configuration Metadata format. This enables IDEs and other tools to process and validate Test Engine configuration.

Usage

Given this minimal example:


/**
  * A brief multi-line description of
  * this property: {@value}.
  *
  * <p>Followed by an additional paragraph.
  */
 @ConfigurationParameter
 public static final String EXAMPLE_PROPERTY_NAME = "org.example.property";

Processing the annotations with org.junit.platform:junit-platform-configuration-processor will produce:


{
  "properties": [
	    {
	  "name": "org.example.property",
      "description": "A brief multi-line description of this property.",
	  "sourceType": "com.example.app.Constants"
   }
  ]
}

Of note is that the first paragraph from the doc string will be used to describe the property. If the first paragraph ends with : {@value}. or : {@value} it will be replaced with .. Likewise {@code} and {@link} tags are replaced with plain text versions.