Package 

Class ProcessEngineCoverageExtension

  • 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, AfterAllCallback
                        

    Extension 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

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit postProcessTestInstance(Object testInstance, ExtensionContext context)
      Unit beforeTestExecution(ExtensionContext context) Handles creating the run if a relevant test method is called.
      Unit afterTestExecution(ExtensionContext context) Handles evaluating the test method coverage after a relevant test method is finished.
      Unit beforeAll(ExtensionContext context) Initializes the suite for all upcoming tests.
      Unit afterAll(ExtensionContext context) If the extension is registered on the class level, log and assert the coverage and create a graphical report.
      final Boolean addTestMethodCoverageCondition(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
    • Constructor Detail

      • ProcessEngineCoverageExtension

        ProcessEngineCoverageExtension(Boolean detailedCoverageLogging, Boolean handleTestMethodCoverage, List<String> excludedProcessDefinitionKeys)
    • Method Detail

      • 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.

      • beforeAll

         Unit beforeAll(ExtensionContext context)

        Initializes the suite for all upcoming tests.

      • 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.