Class SystemTestCoverageExtension
java.lang.Object
org.creekservice.api.system.test.gradle.plugin.coverage.SystemTestCoverageExtension
Extension applied to system test tasks if the JaCoCo plugin is installed.
Handles configuration of coverage options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe path within the container where a read-only directory containing the Jacoco agent will be mountedstatic final StringThe path within the container where a writable directory will be mounted to receive the coverage results.static final StringName of coverage task extension. -
Constructor Summary
ConstructorsConstructorDescriptionCreate extension, attaching it to the suppliedtask. -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp()Remove any previous resultsorg.gradle.api.file.DirectoryProperty
-
Field Details
-
COVERAGE_EXT_NAME
Name of coverage task extension.- See Also:
-
CONTAINER_AGENT_MOUNT
The path within the container where a read-only directory containing the Jacoco agent will be mounted- See Also:
-
CONTAINER_RESULT_MOUNT
The path within the container where a writable directory will be mounted to receive the coverage results.- See Also:
-
-
Constructor Details
-
SystemTestCoverageExtension
Create extension, attaching it to the suppliedtask.- Parameters:
task- the test the extension is being applied to.
-
-
Method Details
-
getResultMountDirectory
@OutputDirectory public org.gradle.api.file.DirectoryProperty getResultMountDirectory()- Returns:
- The directory where results will be written, which will be mounted into the Docker container.
-
mountOptions
- Returns:
- command line arguments to pass to the test executor to set up the coverage mounts.
-
asJavaToolOptions
- Returns:
- the text to place into the
JAVA_TOOL_OPTIONSenvironment variable to have coverage captured.
-
cleanUp
public void cleanUp()Remove any previous results
-