Question
2
Replies
170
Views
PEGA
Posted: March 8, 2019
Last activity: July 24, 2019
Closed
Change Strategy for an AUT Test Case
I have created Test Cases for a Top-Level strategy. I want to copy the test cases to test a sub-strategy. Is it possible to Save-As and update the linked strategy?
I understand that I can change the parameters that are supplied in the Setup section of the TestCase however these appear unlinked to the 'Tested rule: <strategyname>' section on the test case. I want to ensure that the Test Case appears on the TestCase tab of the strategy.
Pega 7.4.0 Designer Studio
As an initial attempt, I have created an activity that opens the test case and updates these two properties:
.pyRuleUnderTest.pyDetails.pyRuleUnderTestLabel
.pyRuleUnderTest.pyDetails.pyRuleUnderTestName
This updates the UI to show the correct strategy in line with the parameters. The next challenge is updating the Test Case Assertion pyPageName properties (which provide the reference for .pxResults) as the XML shows this is still {original strategy}.pxResults.
Again this could be done using the Property-Set step to replace all occurences of the original strategy name with the new one.
I still don't know though how to get the test case to appear on the Strategy Test Cases section.