Posted: 26 Aug 2020 3:21 EDT Last activity: 2 Jan 2021 3:58 EST
Test Case for a When rule
I need advice on how Test Cases for a When rule work.
My expectation was that while Test Case is created from a Run window of the When rule, it would receive the supplied context (clipboard page or data transform), so the the newly created Test Case will run with the same input. The setup for the test case would be automatically configured, just like it happens with decision strategies. But in reality, from what I see, Test Case is created with no context, no setup, and I cannot even supply the context manually. It is not clear which page is test case using for the run. I have tried RunRecordPrimaryPage and pyWorkPage but it seems like the Test Case for When rule is ignoring any input I provide.
The only way I can make test cases for When rules work is by supplying Multiple Input Combinations, which is sometimes OK, but only if a When rule is referencing properties directly. If When rule is invoking another function this approach will not work.