30 May 2016 - Basic K2 Process testing with BlueWave K2 process testing bluewave K2 Blackpearl
We keep encountering the same difficulties when working with workflow; testing our
K2 Process is one of them. The following list contains some of the challenges that we face when testing or developing workflow processes:
- Starting a
K2 Process Instancewith custom parameters
- Impersonating the correct user to action an
Activity(often we do not have rights to perform an action which is targeted to another role than ours)
- Moving a workflow to a specific
- Reproducing the above in a timely manner over and over, as more
K2 Process Instancesbecome necessary for testing
This becomes challenging as we often have to go through multiple screens and different people to get to the part that we want to test. l will now demonstrate how quickly you can achieve this task with BlueWave.
1. Let's take any process, such as a simple Leave Request Process
2. Start a new process instance with custom parameters.
We do this by simply selecting the "Testing" tab, selecting the
K2 Process and clicking Create New Start Scenario. Once the scenario name and parameters are filled in we can simply save the scenario and start the process by pressing the Start Process Button.
3. Move the process instance along the process.
Right click on the
Worklist Item and select "Update and Action". On the "Update and Action" screen we can update
Data Fields and select an
Outcome such as "Approved".
We can then save this
Outcome as a BlueWave Scenario, and it will become available in the right-click menu in the future. These can be used to rapidly walk a
Process Instance to the relevant point for testing. BlueWave Scenarios are also re-used during automated testing, which will be covered in another post.
4. The final result shows that we have successfully moved down the
K2 Process with minimum effort.
We have successfully created a test case without having to interact with the system front-end. We have also saved the start scenario and update scenario for quick reproduction of the above steps.
To download a free trial version of BlueWave for K2, please register and click the Download Setup button.