Question


CIBC
CA
Last activity: 27 Nov 2018 6:42 EST
What is the difference in Pages when Unit Testing Activities
I am attempting to Unit Test an activity and in this activity I have
- Data Transform
- Trying to assert that a property equals a value set by the above Data Transform in the Test Case
For 1, this DT is going to trying to get a hold of the page (specified in the pages and parameters) where the actual activity calls it and sets the property. However, when I try to search for the properties where I set from the DT, I only see them on the D_pzRunRecord Page off a TABTHREAD# page. The RunRecordPrimaryPage has the subpage but the property remains blank and I thought this is where the properties should be.
I don't understand if the Test_Case has its own hierarchy of pages different from the activity or if I am not looking at the pages correctly.
***Edited by Moderator Marissa to update platform capability tags****
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Pegasystems Inc.
GB
Which version of Pega are you using here?
Could you post some screen shots of the Activity and Data transform (including pages and classes tab)?


CIBC
CA


Pegasystems Inc.
GB
Ok, so the data transform is being used as a Setup for the test case right? I was thinking you were calling the DT from the activity that you were testing.
In this case I think you just need to make sure to set the value on the RunRecordPrimaryPage in the DT like this:


CIBC
CA
Hi Marc Alderman so I changed the Target field and source field to match your screenshot however when I construct the property I do not find the any pages on the RunRecordPrimaryPage ( I am expecting to see CaseDetails that we created during our DT).
Additional Questions: On the clipboard, the "run" pages are red and only appear after your run the activity so I assume these are the pages where the data in our test case lie? (D_pzRunRecord and RunRecordPrimaryPage)
-
Uma Davuluri


Pegasystems Inc.
GB
The red pages are where you have used the property-set-message method to set an error on the property. The red just shows there is an error / message there.
The setup data transform only runs when you run the test case itself. How did you get to this point in the no results screen shot? Is it a new recorded test case, or have you just run the one you created previously?


CIBC
CA
- How did you get to this point in the no results screen shot?
- So After the data transform has been placed in the setup, I got back to the definitions in the Test Case to configure the Property Assertion.
- Assertion Type: Property
- Page: RunRecordPrimaryPage
- Page Class: This I tried with the current class of the test case (CIBC-RetBnk-SM-Work) and Pega-RunRecord - No pages2.
On the activity itself, when I go to the property (.CaseDetails.IsActionRequired) where the Property-Set step is it says At Run time, the user adds data to this property through the UI. Data transforms and other rules maybe required to support this workflow.
What does the above mean like are you are not able to fill in that property through data transforms on test cases only through the whole application flow?


CIBC
CA
So the RunRecordPrimaryPage setting does work when I assign a value of "Yes" to
RunRecordPrimaryPage.CaseDetails.IsActionRequired
However, when I try to make another Data Transform and assign the above property to "No" in another Data Transform it fails for another Test Case. It is still retaining its previous value of "Yes". Wouldn't a new Data Transform overwrite the property?


Pegasystems Inc.
IN
Could you share tracer session for your scenario? Also could you give more details on when and how this "another Data Transform" is invoked?


Pegasystems Inc.
IN
Hi Akash,
As per your screenshot unexpectedResults.PNG , and comments provided by Marc, you test case should work correctly.
Few points that might help you resolve the issue by yourself:
1) A set up Data transform/activity always runs a unnamed page. So if one wants to modify the data on RunRecordPrimaryPage then that should be mentioned explicitely.
2) When one clicks on "Add property" , then system searches for step page(here RunRecordPrimaryPage) in all threads and stops search when atleast one thread is found with such page name. However user can change the thread name if he wants to select another thread.
3) Even if data is not ready on any thread : user can click "Add row" on RHS and add expected property path manually; and then fill the RHS with expected value.
Hope that helps.