Question

Automation unit test cases for Circumstanced rules

Hi All,

I created circumstanced Data transform with criteria(to run) that is defined in Circumstance template and Circumstance Definition(defined as property).

It works absolutely fine when DT is triggered from any other rule in run time by passing the required property values in a calling page. At run time Pega picks up the right DT according to the property value passed.

I created AUT's for the same circumstanced DT's and passed the required property(to decide which DT to be picked up) in Set up DT of the test case.

I ran the same and i see that Pega always picks up the base version of circumstanced DT even after we pass the correct property value definition on RunRecordPrimaryPage.

It would be great if some one can help me to understand this behavior and let us know if have to make some other change for it to work.

Otherwise, I can think off raising an SR for this bug if it is considered as one.

Regards,

Syed

Correct Answer
August 2, 2019 - 4:40am

Hi All,

Thanks for your comments.

I have found the root cause & a solution,

The root cause was the context of the page was incorrect as it was not defined with proper class in Pre-setup DT of circumstanced rule due to which it was picking base version all the time.

Solution:- Added correct class name to RunRecordPrimaryPage on Pre-Setup DT of AUT to set the required properties to decide on which circumstanced rule to be picked up. 

Regards,

Syed

Comments

Keep up to date on this post and subscribe to comments

Pega
August 1, 2019 - 12:29pm

Hi Syed,

To my knowledge, the system should pick up circumstanced rule only. Ayhow will check if issue is specific to data transform rules.

May I know which version of PRPC you are using?

Regards,

Vamsi

August 2, 2019 - 3:53am
Response to GUNTV

We are using PRPC 7.3.0 version. 

Pega
August 1, 2019 - 12:50pm

Also, while running the test case, could you check in tracer if all properties(required for circumstanced rule resolution) are correctly set just before call of data transform?

August 2, 2019 - 3:54am
Response to GUNTV

Yes, those properties are set perfectly before calling the rule. Not sure why it always picks up the base rule.

August 2, 2019 - 4:40am

Hi All,

Thanks for your comments.

I have found the root cause & a solution,

The root cause was the context of the page was incorrect as it was not defined with proper class in Pre-setup DT of circumstanced rule due to which it was picking base version all the time.

Solution:- Added correct class name to RunRecordPrimaryPage on Pre-Setup DT of AUT to set the required properties to decide on which circumstanced rule to be picked up. 

Regards,

Syed