Skip to content

Camunda Community Extension to write process tests with JUnit5

License

Notifications You must be signed in to change notification settings

sanogotech/camunda-bpm-junit5

 
 

Repository files navigation

camunda-bpm-junit5

Maven Central

Camunda Community Extension to write process tests with JUnit5

Usage

Maven dependency

Add the dependency to your pom.xml

<dependency>
  <groupId>org.camunda.bpm.extension</groupId>
  <artifactId>camunda-bpm-junit5</artifactId>
  <version>1.0.0</version>
  <scope>test</scope>
</dependency>

Test code

Add the annotation to your test class:

@ExtendWith(ProcessEngineExtension.class)

For further access provide a field where the process engine gets injected:

public ProcessEngine processEngine; 

Or register the extension from the builder:

@RegisterExtension
ProcessEngineExtension extension = ProcessEngineExtension.builder()
  .configurationResource("audithistory.camunda.cfg.xml")
  .build();

and access the process engine from the extension object:

RuntimeService runtimeService = extension.getProcessEngine().getRuntimeService(); 

Examples

To use the JUnit 5 extension together with camunda-bpm-assert have a look at the example-camunda-bpm-assert-junit5.

About

Camunda Community Extension to write process tests with JUnit5

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%