I’m using pega 7.4. and using case types for our current implementation. I want to write test case for a subflow which is being called from a middle stage of the case type.
This sub flow required few properties which will be captured during earlier stages.
The record test case option is available on the sub flow. But there is no way to pass parameters or create a test page to capture the required data.
Can we start recording an unit test case for a middle stage by passing parameters or coping the current workpage ?
Or do we always have to start recording the test case from the beginning of the case type / from a starter flow and create the test cases when we reach the middle stage which we need to save the test cases on.?
Currently, it is not possible to record testcases for flows which need presetup. Parent/Starter flow, if it calls a subflow in it can be automated though. The test case would be against the Parent flow itself and as part of the same testcase, one can try and write subflow related assertions. We plan to provide support for non starter and sub flows in future Pega releases.
One alternative approach you can use here is to create a test starter flow which will call the subflow against which the Pega unit will be written. This test starter flow can control the available pages and parameters to the subflow making it easier to test.