Today development teams are challenged by growing process complexity and constantly changing requirements. To proactively deliver value in a fast and accurate manner, development teams can’t afford to waste time on redundant tasks, complex deployments, and delays from late fixes. Imagine that there’s a magic button which allows you to see your process in action, test if it behaves as expected, and even fix it without having to actually run it.
In this blog post we’d like to introduce the Alpha release of the new process testing functionality which is now available in Camunda Platform 8.
Want to see Camunda 8 in action? Check out this on-demand demo in Camunda Academy to learn more about it.
Table of Contents
- Empower your teams for process development acceleration
- Getting ready to test your first process
- Testing User Tasks and User Forms
- Time travel: testing events with a scheduled timer instantly
- Testing Connectors without affecting production systems
- Testing alternative process flows made easy
- Resolving incidents: find, fix, validate
- Behavior-driven process development with microservices mocking
- Involving your business stakeholders from early stages of development
- What’s next
Empower your teams for process development acceleration
Between the point in time a process is designed and the point it’s running smoothly in production, it must be thoroughly tested. However, before running end-to-end process testing, the development team may need to test bits and pieces of their process multiple times right during the implementation. Previously, they would need to deploy the process each time they wanted to run a small test, for example, to check if a Connector works correctly. It took more time and effort and made it harder to respond to changing requirements.
Business stakeholders were affected too. Those less experienced with BPMN struggled to understand if the process behaved as expected and addressed their needs by simply looking at the process diagram. Alternatively, they had to wait until the release iteration was completed to see the process in action. If the process didn’t do the right thing, it could cause the whole new release cycle to start: process model refinement, process development, regression and user acceptance testing.
All these burdens slowed down the release cycle, and hindered the potential for continuous process improvement.
With our new process testing functionality your team can realistically simulate the process – actually run it – without affecting your production systems, as frequently as needed and at no additional cost required for maintenance of the test environment. Whenever you need it, the test environment will be automatically set up on a temporary Zeebe cluster in seconds.
Now each member of your team is empowered to perform even better and with greater confidence:
- Developers – can rapidly develop processes through trial-and-error experimentation.
- Testers – can perform their tests thoroughly and frequently without affecting production systems and having to set up test environments.
- Business stakeholders – can easily understand and validate that the process behaves as expected.
The new testing functionality is already available for all Camunda Platform 8 SaaS users. Try it for yourself today by creating a free account. For Self-Managed users, it will be accessible in the most recent version of Web Modeler.
After you try it out, be sure and share your feedback with us. You’ll have a chance to win a prize for the best contribution into making the testing easier, faster, and better for everyone!
Getting ready to test your first process
In Camunda Modeler, select a BPMN diagram for the process you want to test or create a new diagram using one of the provided templates. In this example, we use the Absence Request template. When you open the diagram, you can work in two modes – Design and Implement (default). Testing functionality is available in Implement mode, so make sure you selected it on the top-left corner of the toolbar. To start testing, simply click the Test button on the top-right corner of the same toolbar. A temporary Zeebe cluster will automatically set up and load the test environment for you.
The test environment will open in a separate window. We are working on a full integration of the test environment into Camunda Modeler and will release it in the coming months.
Testing User Tasks and User Forms
Now you are ready to test the process:
Let’s start with the first step of our process – User Task – and test how to complete it using a Task Form. Simply click on the blue Fill Form icon attached to the User Task and the real Task Form will be displayed:
Fill in the Task Form and complete it. For convenience, the Task Form remembers the values you entered so you don’t need to enter them again during this session. If needed, you can change or reset them during the next testing iteration with this Task Form.
Now that we’ve completed the User Task, the process execution moves to the next step following the process flow. The respective technical information is displayed at the bottom.
Time travel: testing events with a scheduled timer instantly
There are various timer events supported in BPMN. In our example, an intermediate timer catch event is used to remind a manager to review and approve the new absence request every two days. Luckily, we don’t need to wait two days or do any extra work to test this step. Instead, we will time travel! To do so, click the timer icon and the process will instantly move to the next step.
Testing Connectors without affecting production systems
Camunda Platform 8 provides a powerful integration framework with out-of-the-box Connectors and capabilities to build your own reusable Connectors. When you need to invoke external systems, such as APIs, RPA bots, internal and user-facing applications, you use Connectors. However, testing Connectors may be tricky as it can affect and even harm production systems. In our example with Absence Request, we may or may not want to actually file the request in the system during our multiple tests.
Depending on the situation, you can decide whether to actually invoke a Connector – by clicking the Invoke Connector icon – or to manually complete the Job:
Testing alternative process flows made easy
So far we’ve tested one process flow. We’ve submitted an absence request, run the timer and sent a reminder to the manager – this is where the flow ended. Our process is more complex than that, and consists of several alternative flows. What if the manager approves the request before the timer triggers the reminder? To test each alternative flow, we don’t need to start the testing over, but just use the Rewind function that brings us back to the previous step.
Resolving incidents: find, fix, validate
Process developers can easily spot bugs, apply fixes, and re-test to make sure the fix worked – all is done right within one testing iteration and window. This significantly saves time and effort, and allows for trial-and-error experimentation. The errors that occur during the process execution are highlighted and the respective incident with error details is logged under the Incidents tab. You can resolve the incident by hitting the Resolve button and applying the fix, then re-test to validate the result.
Behavior-driven process development with microservices mocking
Microservices architecture is very common, so microservices are often a part of process orchestration. Along with numerous benefits, microservices may impose some difficulties too. When it comes to the development and end-to-end testing of the whole process that interacts with microservices, process development teams are very dependent on microservices implementation teams. This dependency can introduce costly project delays if process development teams can’t test their processes until the microservices are complete, or if a microservice has to be reworked in order to support the process.
The new testing functionality helps to avoid this by complementing the service contract and showing how a microservice’s response would be used in the rest of the process. You can easily mock microservices to simulate their behavior without having to build the microservice or open your firewall to it. This allows your team to concentrate on the process business logic without delays and overhead, achieve better alignment with microservices development teams faster, and ease interaction with the business stakeholders through an understandable demo-format.
Involving your business stakeholders from early stages of development
Business users no longer need to wait until the process is fully implemented, tested, and deployed just to see if it will work as they expect. Now your process development team can regularly engage business users and demonstrate how the process works. This will help you to validate the business logic and implement changes and improvements before it’s too late, risky, and costly.
The new testing functionality in Camunda Platform is an evolution of the Zeebe Play community project created by Philipp Ossler, Senior Software Engineer at Camunda. It all had started as an experiment but soon found a positive response from the community and proved its value to the first users, so we decided to make it a part of Camunda Platform 8. We are continuously improving the quality and enriching the testing functionality with new features. Future developments include but not limited to:
- Visibility into DMN events
- Support symbols introduced in the newest versions of Zeebe
- UI and UX improvements
Join us now and be among the first to try the new testing functionality. If you don’t have a Camunda account yet, create one for free. Share your feedback with us and get a chance to win a prize for the best contribution into making the testing easier, faster, and better for everyone.