Bonita Test Toolkit

Learn how to write and execute integration tests for your Bonita processes to improve the quality and the durability of your developments using the Bonita Test Toolkit.
Developer skills are required to follow this documentation and, generally, to write process integration tests.

Integrations tests are built upon the Bonita Test Toolkit, based on the open-source Bonita Java Client.
The Bonita Test Toolkit is only available for Subscription editions.

Motivations

In the world of development, writing tests is not an option. It is the best way to ensure that a product fulfills its requirements and that existing features won’t be broken by future developments.

This applies to Bonita processes. For each process, an integration test should be written, to validate that the process executes correctly depending on the inputs, that after each task the platform is in the expected state, and so on.

The Bonita Test Toolkit offers the possibility to write such tests. It performs HTTP calls on the targeted Bonita platform to start and execute cases, and make assertions at any time on the state of the platform, the content of the data…​
It is a Java library and can be integrated with many existing test frameworks like JUnit 5, Spock, Cucumber…​etc.

The Bonita Test Toolkit should only target non-production runtime.

Prerequisites

  • The library requires Java 11

  • It is recommended to have a minimal knowledge of Maven and JUnit 5

Supported runtime version

Only the subscription runtime with a license compliant with the Test Toolkit are supported.

Multi-tenancy is not supported.

Bonita Test Toolkit Runtime

1.x

2021.1* (Java 11 only), 2021.2*, 2022.1, 2022.2, 2023.1

2.x

2021.2*, 2022.1, 2022.2, 2023.1, 2023.2, 2024.1, 2024.2, 2024.3

3.x

2021.2*, 2022.1, 2022.2, 2023.1, 2023.2, 2024.1, 2024.2, 2024.3

* There are known limitations with those runtime versions:

  • Sending signals is not supported

  • Reading archived tasks or processes variables is not supported

  • Timer execution can take more than 30 seconds

Project Structure

A Bonita test project is a stand-alone project than can either:

  • Be included in a Bonita project (e.g.: in a tests subfolder) and use the same git repository and versionning for your processes and their tests.

  • Developed in a dedicated project and git repository.

We recommend the first option but you’re free to choose what is best for you.