Question

Re-using a test-case for multiple rules

Is there any way by which we can test multiple when rules, which are similar ( similar in the sense that they check the same single property ) using a single test case, rather than create multiple copies of the same test-case for each when rule? What I want as an end result, is to have the same test case appear in the "Test Cases" tab of each of my when rule, without creating copies of the same test case for each of them.

Thanks in advance!

***Edited by Moderator: Lochan to update platform capability tags***

Correct Answer
September 17, 2019 - 3:01am

Hello, 

I don't think you can do this currently. It is always associated to a specific rule.

Comments

Keep up to date on this post and subscribe to comments

September 17, 2019 - 3:01am

Hello, 

I don't think you can do this currently. It is always associated to a specific rule.

September 25, 2019 - 7:54am
Response to MarcLasserre_GCS

Hi Marc,

Thanks for replying,

Any idea whether it will be added in the future versions of Pega?

September 26, 2019 - 9:57pm

Hi

As you mentioned the When rules are similiar, so what is the differentiating factor between them? Can you share an example?

 

Regards

Bhavya

September 27, 2019 - 1:03am
Response to Bhavya_Incessant

Hi Bhavya,

The differentiating factor between the WHEN rules are the ranges of dates, for which a "date-property" is checked. For example:

WHEN rule - 1 :

Return TRUE if "Test_Date" is in between "today and 3 days from today" both inclusive

WHEN rule - 2 : 

Return TRUE if "Test_Date" is in between "4 days from today and 7 days from today" both inclusive

And so on....

I just want to write a single test case where it will return FALSE once I pass a blank value, a non-date value and any binary value, and use the same test case for each one these WHEN rules.

September 27, 2019 - 10:02am
Response to TanmayR

Hi

Looking at the When rules, I think the better approach would be combine them in One when rule with necessary conditions. I really dont see a point of having multiple when rules in this scenario unless I am missing something.

Regards

Bhavya