Question
Unit testing decision table - Functions in Return value
v7.3.1
A decision table rule has one column sourced by a property and it returns an output value based on the property value. We use a function - addCalendar in my example - to calculate the return value.
When I try to build a unit test case for this decision rule, since the output is dynamic, I want to be able to use a function in the return column of the test case as well but the function is treated as a literal string and my test case fails.
Any suggestions?
***Edited by Moderator: Lochan to update platform capability tags***
Hi,
If you are using Pega unit test cases for testing, then the support is limited to parameter/values as observed in the scenario you have mentioned.
You can try Ninja which is specifically developed for Pega and allows you to write Junit tests for your rules to perform extensive testing in a similar way as Java. You can get it from here:
https://pegadevops.com/news/
Let me know if this helps.