Automation unit test cases for Circumstanced rules
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.
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.
Keep up to date on this post and subscribe to comments
- Automated Unit Testing- v7.1.7- unable to create unit test cases
- Cannot view the Test Cases when switching between PegaUnit testing and Automated Unit Testing
- Not Able to Save the Test Case for Service-SOAP while doing Automated Unit Testing.How it can be achieved?
- Creating an automated unit test case for a sub flow
- How to get the rules hit when some automated test case being executed? Can we get this list of rules in any DB table.