A closer look at Bonita 2022.1: The Bonita Test Toolkit

soham.datta's picture
soham.datta
Blog Categories: 
Bonita 2022.1 is finally out! Let's continue diving into some of the new features of Bonita 2022.1!
Still using Bonita 2021.2? Download the latest version here.

A Closer look at Bonita 2022.1

In the following series of articles, you'll learn about each new features of the new Bonita release, one by one. Whether you are using Bonita Community or Bonita Enterprise, you will find in this series of posts some great new functionalities and improvements. Last week we took a look at the updated Bonita Docker Image .

This week’s post is about Bonita Test Toolkit. This post - a 5-minute read - is intended to help you quickly understand what Bonita Test Toolkit is and how we can benefit from it.

Bonita Test Toolkit

(Note: Bonita Test Toolkit is available to Enterprise users only)

Why?

Importance of Testing

Writing tests is a necessity in the world of development, as they are the best way to make sure that a product fulfills its requirements and that existing features won’t be broken by future developments.

This also applied to Bonita projects especially when you have critical and core processes.

Testing Bonita projects

Until the Bonita Test Toolkit, Bonita provided limited tools to perform tests and most of the testing for a Bonita project was manual and therefore inefficient, error-prone, cumbersome… in other words a major pain!

This is where Bonita Test Toolkit comes in!

The Bonita Test Toolkit offers the possibility to write automated integration tests on your processes.

It provides powerful methods to execute all the steps of a process and check the corresponding outputs (statuses, business data, tasks, authorizations).

Once your tests are written, they can be executed on a target runtime to automatically verify that the process automation project works as expected.

Thanks to those tests, you will be able to detect any issues in your project before deploying in a production environment without spending hours testing your project. Your production deployment will be worry-free.

So what can I do with this Test Toolkit?

As stated above, Bonita Test Toolkit allows you to perform integration tests.

With integration testing, you are testing your Bonita project as a whole (including any interactions with third parties) in a given environment. You are close to the context of your production.

What about unit testing and UI testing?

Unit testing is a topic went to tackle in the future and we believe that for the UI testing great tools already exist. See our article on how to test your UID application with Cypress.

It is a Java library and therefore it is for professional developers with Java coding skills. 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, and so on.

The Bonita Test Toolkit can be integrated with many existing test frameworks like JUnit 5, Spock, Cucumber…​etc.

You can perform Actions and then make assertions such as:

Actions

  • Initiate process (with a specific user)
  • Execute a task
  • Retrieve pending tasks
  • Define a contract
  • Assign a task
  • Execute a task
  • Send a signal

Assertions

  • Check the status (task, case)
  • Check the task candidates
  • Check BDM data
  • Check process variables
  • Validate connector execution states
  • Check documents

From there you can create your test scenarios that will execute your processes and check the results with the assertions.

What changed?

Want to try it?

Get the Bonita Test Toolkit here and you can find our tutorial! here. You can also check out this video from Florent demonstrating the new Bonita Test Toolkit. You can watch it over here.

And don't forget you can always read our official documentation and the release notes.

Notifications