<commit_before>#&nbsp;<img src="/doc/img/camunda.png" width="23" height="23">&nbsp;Camunda&nbsp;BPM&nbsp;Process&nbsp;Test&nbsp;Coverage</img&nbsp;>&nbsp;<a href="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage"><img src="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage/badge.svg"/></a>&nbsp;<a href="https://travis-ci.org/camunda/camunda-bpm-process-test-coverage"><img src="https://api.travis-ci.org/camunda/camunda-bpm-process-test-coverage.svg"/></a> 

This Camunda BPM community extension **visualises** test process **pathes** and **checks** your process model **coverage** ratio. Running  typical JUnit tests now leaves **html** files in your build output. Just open one and check yourself what your test did:

![Insurance Application](/doc/img/insurance-application.png)

## Highlights

* **Visually verify** the pathes covered by individual tests **methods** and whole test **classes**
* Visually check gateway **expressions** and transaction borders (**savepoints**) used by your process
* Calculate and **verify** the nodes (_and_ sequence flow) **coverage** ratio reached by tests methods and classes

## <a href="https://travis-ci.org/camunda/camunda-bpm-process-test-coverage"><img src="https://api.travis-ci.org/camunda/camunda-bpm-process-test-coverage.svg" align="right"/></a>Just use it

* Integrates with all versions of Camunda BPM starting with 7.2.0 and upwards 
* Works with all relevant Java versions: 1.6, 1.7 and 1.8 - using JUnit 4.12
* Is continuously checked against latest Camunda BPM releases - see the full [**travis-ci**](https://travis-ci.org/camunda/camunda-bpm-process-test-coverage) matrix for details

## Get started with *3 simple steps*

<a href="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage"><img src="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage/badge.svg" align="right"></img></a>**1.** Add a **Maven test dependency** to your project

```xml
<dependency>
  <groupId>org.camunda.bpm.extension</groupId>
  <artifactId>camunda-bpm-process-test-coverage</artifactId>
  <version>0.2.8</version>
  <scope>test</scope>
</dependency>
```

**2.** Use the **ProcessCoverageInMemProcessEngineConfiguration**, e.g. in your `camunda.cfg.xml`

```xml
<bean id="processEngineConfiguration"
   class="org.camunda.bpm.extension.process_test_coverage.junit.rules.ProcessCoverageInMemProcessEngineConfiguration">
   ...
</bean>
```

**3.** Use the **TestCoverageProcessEngineRule** as your process engine JUnit rule

```java
@Rule
@ClassRule<commit_msg>doc(readme): point out that JUnit 4.11 does not work<commit_after>#&nbsp;<img src="/doc/img/camunda.png" width="23" height="23">&nbsp;Camunda&nbsp;BPM&nbsp;Process&nbsp;Test&nbsp;Coverage</img&nbsp;>&nbsp;<a href="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage"><img src="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage/badge.svg"/></a> 

This Camunda BPM community extension **visualises** test process **pathes** and **checks** your process model **coverage** ratio. Running  typical JUnit tests now leaves **html** files in your build output. Just open one and check yourself what your test did:

![Insurance Application](/doc/img/insurance-application.png)

## Highlights

* **Visually verify** the pathes covered by individual tests **methods** and whole test **classes**
* Visually check gateway **expressions** and transaction borders (**savepoints**) used by your process
* Calculate and **verify** the nodes (_and_ sequence flow) **coverage** ratio reached by tests methods and classes

## <a href="https://travis-ci.org/camunda/camunda-bpm-process-test-coverage"><img src="https://api.travis-ci.org/camunda/camunda-bpm-process-test-coverage.svg" align="right"/></a>Just use it

* Integrates with all versions of Camunda BPM starting with 7.2.0 and upwards 
* Works with all relevant Java versions: 1.6, 1.7 and 1.8 - using **JUnit 4.12** (4.11 does not work)
* Is continuously checked against latest Camunda BPM releases - see the full [**travis-ci**](https://travis-ci.org/camunda/camunda-bpm-process-test-coverage) matrix for details

## Get started with *3 simple steps*

<a href="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage"><img src="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage/badge.svg" align="right"></img></a>**1.** Add a **Maven test dependency** to your project

```xml
<dependency>
  <groupId>org.camunda.bpm.extension</groupId>
  <artifactId>camunda-bpm-process-test-coverage</artifactId>
  <version>0.2.8</version>
  <scope>test</scope>
</dependency>
```

**2.** Use the **ProcessCoverageInMemProcessEngineConfiguration**, e.g. in your `camunda.cfg.xml`

```xml
<bean id="processEngineConfiguration"
   class="org.camunda.bpm.extension.process_test_coverage.junit.rules.ProcessCoverageInMemProcessEngineConfiguration">
   ...
</bean>
```

**3.** Use the **TestCoverageProcessEngineRule** as your process engine JUnit rule

```java
@Rule
@ClassRule
{'fraction_non_alphanumeric': 0.1586322869955157, 'fraction_numerical': 0.009715994020926755, 'mean_word_length': 5.568098159509202, 'pattern_counts': {'":': 0, '<': 54, '<?xml version=': 0, '>': 54, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1386161', 'n_tokens_mistral': 1799, 'n_tokens_neox': 1714, 'n_words': 383}