Testing is without doubts the ugly duckling of application development, but it is really a necessary evil 🙂 Testing in itself is a whole separate discipline where one can have several types of Testing ->Unit, Integrated, Performance, Load, Regression, E2E.
The idea here is to focus only on the testing capabilities that are part of the PCS platform, and how to use them to improve the development stage.
Option 1
The easy way to test the development efforts is straight from the canvas. By pressing the play button the workflow will start and we are given the choice about the user that is playing a role in the execution.
Think of this as a sort of Unit Test! You can select who initiates the process and who approves it and act as those users.
In this process the start is via a Form (as defined in the previous post)
In this test there is no other user to approve/reject. I have both roles and I can open the form to see the details (where we also have extra Actions), or simply Approve/Reject from the wizard.
Option 2
This is closer to a real test. Here we can define the user/roles and use the user tasks to simulate the real behavior of the process.
You can simply press the button Test on the top right of the canvas.
Please note that you can also Play the process via this screen. I do find it easier with the direct button from the canvas.
For this case we use Try in Test Mode.
Once I pick the desired process we get immediately the Start Form.
Important to understand the user/roles definition for this process (including the Swim-lanes). This is how we can properly test the process simulating production like user/role assignments.
I choose the same user to be requester/approver. But if I have a different user as the approver, the below screen would only be visible from the Approver My Tasks menu.
Another menu option is the Processes view, which gives a graphical overview of the state of the process and the role responsible for the next action. Quite insightful.
Conclusion
This post showed the different Testing approaches. One closer to Unit Test, and another one that provides a more consistent framework to simulate a realistic process.
The next post in these series will show how to publish and activate the process!