Testing business processes can take a lot of time and resources. To test all the possible variations and different scenarios in a complex business process manually, can be quite challenging and time-consuming. This is further evident when we take into account that business process management processes are usually long running. This means that finding a bug by utilizing an iterative process can take several days as there may be thousands of process instances running on the potentially bug-affected process. Therefore, there is a need for a sophisticated testing framework for BPM platforms. And it is evident that automation is crucial. There are a few different ways to implement automated testing. Let us have a closer look at the key methods.
JUnit is an open source unit testing framework. It is ready to use, well-known to Java developers and it is easy to use as almost everything can be expressed in Java code. This is the best tool for low level testing of technical aspects, such as testing services and REST APIs.
However, it has some disadvantages, such as when it comes to more business-oriented end-to-end testing. Testing in this instance is usually performed by business and test analysts, who may not be familiar with Java. Also, writing unit tests can be very time consuming. Last but not least, you need to build up a special infrastructure, because JUnit cannot be run directly from the workflow engine.
A very interesting option is to use business process modeling and notation (BPMN) for testing. Using BPMN to write the test cases can bring about many benefits. It allows process modelers, such as test and business analysts, to design the tests in their usual manner on a user-friendly level.
Tests are event based and tasks can be tested step by step. Different input variables can be used and assertions tested. To achieve this though, the pallet of workflow nodes needs to be extended. New nodes need to be specifically prepared for testing. This makes the testing more user friendly and flexible. Process events (such as deploy, start, complete) can be designed manually, while evaluation is part of the process test definition.
Workflow nodes for testing the nodes available in the library (palette)
With these two methods, the possibilities are huge. But what about testing something in an environment that comes close to the real world?
Simulations are the answer. For simulations, different virtualized situations can be applied and tested. The goal here is to simulate a variety of states in a fast and efficient manner. Imagine you want to test a car and you would like to run the car to the end of a pre-defined route but you also want to see its performance with different weather conditions. With virtualization, the same flows can be retested under different circumstances very quickly and easily.
If your workflow management platform runs on the Activiti engine, then Activiti-Crystalball could be a good solution to implement this virtualization for testing. With the appropriate tooling, it is easy to reuse data, start simulations and then to replay the workflow behavior from the set-up history.
For developers, unit testing is a natural thing to do. Concluding unit tests is always useful, especially with the focus on testing at lower rather technical levels. Process testing is the friendlier option for process modelers too. In order to test a process efficiently under different complex circumstances, concluding simulations is a cost-effective and time-saving method to do so.
Last but not least, the magic lies in finding the right mix between the mentioned options as all the different options follow their own specific purpose, but finding the right combination means they can complement each other to achieve more effective results.
Martin Grofčík
Product Developer
Fintech giant FIS is leveraging technology to streamline and simplify the loan origination process. Their key message? Digital transformation is no longer optional but essential for success in today's demanding market. Read more.
At FlowFest24, Oksana Dovorecka, a Senior Transformation Lead at a global bank, delivered a compelling presentation on how her global organization successfully leveraged technology to empower knowledge workers and give them the tools they need to excel.
In today’s fast-paced digital landscape, organizations seek effective business automation. Flowable offers a solution to unify and orchestrate existing tools for process efficiency without replacing systems already in place.