-
- All Implemented Interfaces:
-
org.junit.jupiter.api.extension.AfterAllCallback,org.junit.jupiter.api.extension.AfterTestExecutionCallback,org.junit.jupiter.api.extension.BeforeAllCallback,org.junit.jupiter.api.extension.BeforeTestExecutionCallback,org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.ParameterResolver,org.junit.jupiter.api.extension.TestInstancePostProcessor,org.junit.jupiter.api.extension.TestWatcher
public final class ProcessEngineCoverageExtension extends ProcessEngineExtension implements BeforeAllCallback, AfterAllCallbackExtension for JUnit 5 which allows the tracking of coverage information for Camunda BPM process tests. Based on the ProcessEngineExtension from the camunda-bpm-junit5 from the camunda community. https://github.com/camunda-community-hub/camunda-bpm-junit5
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classProcessEngineCoverageExtension.Companionpublic final classProcessEngineCoverageExtension.Builder
-
Field Summary
Fields Modifier and Type Field Description private final ProcessEngineprocessEngineprivate final ProcessEngineConfigurationImplprocessEngineConfigurationprivate final StringconfigurationResourceprivate final StringdeploymentId
-
Constructor Summary
Constructors Constructor Description ProcessEngineCoverageExtension(Boolean detailedCoverageLogging, Boolean handleTestMethodCoverage, List<String> excludedProcessDefinitionKeys)
-
Method Summary
Modifier and Type Method Description UnitpostProcessTestInstance(Object testInstance, ExtensionContext context)UnitbeforeTestExecution(ExtensionContext context)Handles creating the run if a relevant test method is called. UnitafterTestExecution(ExtensionContext context)Handles evaluating the test method coverage after a relevant test method is finished. UnitbeforeAll(ExtensionContext context)Initializes the suite for all upcoming tests. UnitafterAll(ExtensionContext context)If the extension is registered on the class level, log and assert the coverage and create a graphical report. final BooleanaddTestMethodCoverageCondition(String methodName, Condition<Double> condition)-
Methods inherited from class org.camunda.bpm.extension.junit5.test.ProcessEngineExtension
testAborted, testDisabled, testFailed, testSuccessful -
Methods inherited from class org.camunda.bpm.extension.process_test_coverage.junit5.ProcessEngineCoverageExtension
build, configurationResource, getConfigurationResource, getDeploymentId, getProcessEngine, getProcessEngineConfiguration, initializeProcessEngine, resolveParameter, setProcessEngine, supportsParameter -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
postProcessTestInstance
Unit postProcessTestInstance(Object testInstance, ExtensionContext context)
-
beforeTestExecution
Unit beforeTestExecution(ExtensionContext context)
Handles creating the run if a relevant test method is called.
-
afterTestExecution
Unit afterTestExecution(ExtensionContext context)
Handles evaluating the test method coverage after a relevant test method is finished.
-
afterAll
Unit afterAll(ExtensionContext context)
If the extension is registered on the class level, log and assert the coverage and create a graphical report. For the class coverage to work all the test method deployments have to be equal.
-
addTestMethodCoverageCondition
final Boolean addTestMethodCoverageCondition(String methodName, Condition<Double> condition)
-
-
-
-