Close popover
Andzej Sokolovski (AndzejS3)
Software engineer
AndzejS3 Member since 2019 8 posts
Posted: August 26, 2020
Last activity: January 2, 2021

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.

I have found very similar question in this forum but with no answer - 

May someone advise please what is the suggested approach when creating Test Cases for When rules

Thanks and Regards


***Edited by Moderator: Pallavi to change category from General to Product, update platform capability tags***

Pega Platform Case Management