I am attempting to Unit Test an activity and in this activity I have
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****
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)
Posted: 4 years ago
Posted: 8 Nov 2018 5:39 EST
Marc Alderman (Marc Alderman)
Senior Principal Engineer, Technical Support
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?
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 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?
So the RunRecordPrimaryPage setting does work when I assign a value of "Yes" to
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?
Posted: 4 years ago
Posted: 27 Nov 2018 6:42 EST
Vamsi Gunturi (GUNTV)
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.