Skip to content

Commit

Permalink
chore: updated build files and READMEs, added falsely ignored coverag…
Browse files Browse the repository at this point in the history
…e example
  • Loading branch information
gclaussn committed Apr 20, 2024
1 parent 2c282b3 commit 373c825
Show file tree
Hide file tree
Showing 29 changed files with 410 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build/

# camunda-modeler-plugin
.nyc_output/
coverage/
camunda-modeler-plugin/coverage/
bpmn-driven-testing-plugin.zip
dist/
node_modules/
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
[![](https://img.shields.io/badge/Community%20Extension-An%20open%20source%20community%20maintained%20project-FF4700)](https://github.com/camunda-community-hub/community)
[![](https://img.shields.io/badge/Lifecycle-Incubating-blue)](https://github.com/Camunda-Community-Hub/community/blob/main/extension-lifecycle.md#incubating-)
![Compatible with: Camunda Platform 7](https://img.shields.io/badge/Compatible%20with-Camunda%20Platform%207-26d07c)
[![Maven plugin](https://img.shields.io/maven-central/v/org.camunda.community/bpmn-driven-testing-maven-plugin.svg?label=Maven%20plugin)](https://central.sonatype.com/artifact/org.camunda.community/bpmn-driven-testing-maven-plugin/0.9.0/versions)
[![Gradle plugin](https://img.shields.io/maven-central/v/org.camunda.community/bpmn-driven-testing-gradle-plugin.svg?label=Gradle%20plugin)](https://central.sonatype.com/artifact/org.camunda.community/bpmn-driven-testing-gradle-plugin/0.9.0/versions)
[![Maven plugin](https://img.shields.io/maven-central/v/org.camunda.community/bpmn-driven-testing-maven-plugin.svg?label=Maven%20plugin)](https://central.sonatype.com/artifact/org.camunda.community/bpmn-driven-testing-maven-plugin/0.10.0/versions)
[![Gradle plugin](https://img.shields.io/maven-central/v/org.camunda.community/bpmn-driven-testing-gradle-plugin.svg?label=Gradle%20plugin)](https://central.sonatype.com/artifact/org.camunda.community/bpmn-driven-testing-gradle-plugin/0.10.0/versions)

[Camunda Platform 7](https://docs.camunda.org/manual/latest/) extension, which is able to generate test code based on an extended BPMN model.

Expand All @@ -17,6 +17,8 @@ The extension consists of:
- [Camunda Modeler plugin](camunda-modeler-plugin) for a visual selection and the management of test cases
- [Maven plugin](maven-plugin) / [Gradle plugin](gradle-plugin) for generation of JUnit 5 based test code

:warning: Version [0.10.0](https://github.com/camunda-community-hub/bpmn-driven-testing/tree/0.10.0) supports only [Camunda 7.21](https://docs.camunda.org/manual/7.21/) (Java 11+) and drops test code generation for JUnit 4. For older Camunda versions (Java 8+) and JUnit 4 support, please rely on version [0.9.0](https://github.com/camunda-community-hub/bpmn-driven-testing/tree/0.9.0).

## Features
- Visual test case selection
- Automatic path finding with
Expand All @@ -32,7 +34,7 @@ The extension consists of:
- Spring/Spring Boot test support - see `advanced-spring*` under [integration tests](integration-tests/)
- Testing of arbitrary paths through a BPMN process
- Test case validation and migration, when a BPMN process was changed - see [docs](docs/test-case-validation-and-migration.md)
- [camunda-process-test-coverage](https://github.com/camunda-community-hub/camunda-process-test-coverage) extension support - see `coverage-*` under [integration tests](integration-tests/)
- [camunda-process-test-coverage](https://github.com/camunda-community-hub/camunda-process-test-coverage) extension support - see `coverage*` under [integration tests](integration-tests/)

## How does it work?

Expand Down Expand Up @@ -72,9 +74,9 @@ When the BPMN model is saved, the selected test cases are attached to the BPMN p
```

### Generate test code
To generate the code for the selected test cases, a developer must run the **generator** goal of the [bpmn-driven-testing-maven-plugin](maven-plugin).
To generate the code for the selected test cases, a developer must run the **generator** goal of the [bpmn-driven-testing-maven-plugin](maven-plugin) or the **generateTestCases** task of the [bpmn-driven-testing-gradle-plugin](gradle-plugin).

The goal finds all *.bpmn files under `src/main/resources` and looks for BPMN processes with a `bpmndt:testCases` extension element.
The goal (or task) finds all *.bpmn files under `src/main/resources` and looks for BPMN processes with a `bpmndt:testCases` extension element.
Each test case will result in a [JUnit 5 extension](https://junit.org/junit5/docs/current/api/org.junit.jupiter.api/org/junit/jupiter/api/extension/Extension.html) - in this example: `generated.order_fulfillment.TC_Happy_Path`.

### Implement tests
Expand Down
4 changes: 2 additions & 2 deletions camunda-modeler-plugin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion camunda-modeler-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bpmn-driven-testing-plugin",
"version": "0.10.0-SNAPSHOT",
"version": "0.11.0-SNAPSHOT",
"description": "Camunda Modeler Plugin for BPMN Driven Testing",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions gradle-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.toString() == 'org.camunda.community.bpmndt') {
useModule("org.camunda.community:bpmn-driven-testing-gradle-plugin:0.9.0")
useModule("org.camunda.community:bpmn-driven-testing-gradle-plugin:0.10.0")
}
}
}
Expand All @@ -54,7 +54,7 @@ plugins {
}
```

Please see [Maven Central](https://central.sonatype.com/artifact/org.camunda.community/bpmn-driven-testing-gradle-plugin/0.9.0/versions) to get a specific version.
Please see [Maven Central](https://central.sonatype.com/artifact/org.camunda.community/bpmn-driven-testing-gradle-plugin/0.10.0/versions) to get a specific version.

## Configuration
Available properties:
Expand Down
2 changes: 1 addition & 1 deletion gradle-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.camunda.community</groupId>
<artifactId>bpmn-driven-testing-root</artifactId>
<version>0.10.1-SNAPSHOT</version>
<version>0.11.0-SNAPSHOT</version>
</parent>

<artifactId>bpmn-driven-testing-gradle-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.camunda.community</groupId>
<artifactId>bpmn-driven-testing-root</artifactId>
<version>0.10.1-SNAPSHOT</version>
<version>0.11.0-SNAPSHOT</version>
</parent>

<artifactId>bpmn-driven-testing-impl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/advanced-multi-instance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<junit.jupiter.version>5.9.3</junit.jupiter.version>
<slf4j.version>1.7.36</slf4j.version>

<plugin.version>0.10.0-SNAPSHOT</plugin.version>
<plugin.version>0.11.0-SNAPSHOT</plugin.version>
</properties>

<repositories>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/advanced-multi-instance/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.toString() == 'org.camunda.community.bpmndt') {
def pluginVersion = startParameter.projectProperties['plugin.version'] ?: '0.10.0-SNAPSHOT'
def pluginVersion = startParameter.projectProperties['plugin.version'] ?: '0.11.0-SNAPSHOT'
useModule("org.camunda.community:bpmn-driven-testing-gradle-plugin:${pluginVersion}")
}
}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/advanced-spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<h2.version>2.2.224</h2.version>
<spring.boot.version>3.2.4</spring.boot.version>

<plugin.version>0.10.0-SNAPSHOT</plugin.version>
<plugin.version>0.11.0-SNAPSHOT</plugin.version>
</properties>

<repositories>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/advanced-spring-boot/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.toString() == 'org.camunda.community.bpmndt') {
def pluginVersion = startParameter.projectProperties['plugin.version'] ?: '0.10.0-SNAPSHOT'
def pluginVersion = startParameter.projectProperties['plugin.version'] ?: '0.11.0-SNAPSHOT'
useModule("org.camunda.community:bpmn-driven-testing-gradle-plugin:${pluginVersion}")
}
}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/advanced-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<slf4j.version>1.7.36</slf4j.version>
<spring.version>6.1.5</spring.version>

<plugin.version>0.10.0-SNAPSHOT</plugin.version>
<plugin.version>0.11.0-SNAPSHOT</plugin.version>
</properties>

<repositories>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/advanced-spring/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.toString() == 'org.camunda.community.bpmndt') {
def pluginVersion = startParameter.projectProperties['plugin.version'] ?: '0.10.0-SNAPSHOT'
def pluginVersion = startParameter.projectProperties['plugin.version'] ?: '0.11.0-SNAPSHOT'
useModule("org.camunda.community:bpmn-driven-testing-gradle-plugin:${pluginVersion}")
}
}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/advanced/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<junit.jupiter.version>5.9.3</junit.jupiter.version>
<slf4j.version>1.7.36</slf4j.version>

<plugin.version>0.10.0-SNAPSHOT</plugin.version>
<plugin.version>0.11.0-SNAPSHOT</plugin.version>
</properties>

<repositories>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/advanced/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.toString() == 'org.camunda.community.bpmndt') {
def pluginVersion = startParameter.projectProperties['plugin.version'] ?: '0.10.0-SNAPSHOT'
def pluginVersion = startParameter.projectProperties['plugin.version'] ?: '0.11.0-SNAPSHOT'
useModule("org.camunda.community:bpmn-driven-testing-gradle-plugin:${pluginVersion}")
}
}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/coverage-spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2.version>2.2.224</h2.version>
<spring.boot.version>3.2.4</spring.boot.version>

<plugin.version>0.10.0-SNAPSHOT</plugin.version>
<plugin.version>0.11.0-SNAPSHOT</plugin.version>
</properties>

<repositories>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/coverage-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<slf4j.version>1.7.36</slf4j.version>
<spring.version>6.1.5</spring.version>

<plugin.version>0.10.0-SNAPSHOT</plugin.version>
<plugin.version>0.11.0-SNAPSHOT</plugin.version>
</properties>

<repositories>
Expand Down
129 changes: 129 additions & 0 deletions integration-tests/coverage/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>org.example.it</groupId>
<artifactId>bpmndt-coverage</artifactId>
<version>1</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Versions -->
<assertj.version>3.24.2</assertj.version>
<camunda.bpm.version>7.21.0</camunda.bpm.version>
<camunda.bpm.assert.version>15.0.0</camunda.bpm.assert.version>
<camunda.process.test.coverage.version>2.3.1</camunda.process.test.coverage.version>
<h2.version>2.2.224</h2.version>
<junit.jupiter.version>5.9.3</junit.jupiter.version>
<slf4j.version>1.7.36</slf4j.version>

<plugin.version>0.11.0-SNAPSHOT</plugin.version>
</properties>

<repositories>
<repository>
<id>camunda-bpm-nexus</id>
<name>camunda-bpm-nexus</name>
<url>https://artifacts.camunda.com/artifactory/public/</url>
</repository>
</repositories>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>${camunda.bpm.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
</dependency>

<!-- Test -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<version>${camunda.bpm.assert.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-junit5-platform-7</artifactId>
<version>${camunda.process.test.coverage.version}</version>
<scope>test</scope>
</dependency>

<!-- needed for camunda-process-test-coverage-junit5-platform-7 -->
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bpm-junit5</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>21</release>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M6</version>
</plugin>

<plugin>
<groupId>org.camunda.community</groupId>
<artifactId>bpmn-driven-testing-maven-plugin</artifactId>
<version>${plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generator</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 373c825

Please sign in to comment.