Question
Accenture Services Pvt.ltd
IN
Last activity: 17 Aug 2020 2:52 EDT
Test Data during Scenario Testing
Hi,
We are exploring Scenario testing on Pega 8.1 and we are unable to provide test data to run the tests. Data captured during the first run is always used as the test data. Can we provide a Data Transform or an Activity rule that can supply test data to the scenario test cases?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi,
You can use data transform to provide test data to scenario test cases.
Pegasystems Inc.
US
To add a little more helpful suggestion, you need to update a data page D_pyScenarioTestData which can be supplied with the test data. This can then be populated as follows (for the appropriate input fields)
Accenture Services Pvt.ltd
IN
Thanks Linoy. This is very helpful.
Accenture Services Pvt.ltd
IN
Hi Linoy,
While setting up test cases using Scenario testing, I am trying to add an explicit assertion on a property of type Integer. I want to check if the amount is greater than a certain value. However, there is no other comparator other than the "equal to". How do I set the test case for this requirement.
Attached is a screenshot.
Regards,
Namitha
Pegasystems Inc.
US
At this point the only supported validation equal to. You can do regular expressions, although it would get fairly complicated and maintaining the comparison, for example here is one possible regular expression to use for this, which I found by ^(?:[1-9]\d+|[2-9])$ searching Google. For how to specify regular expressions see the post Scenario testing: How to create, run & Edit test cases.
CareFirst Inc
US
i modified the pyScenarioTestData datatransform to define the testing data, however the data is not loaded to the scenario test cases. anything else I need to configure?
coforge
IN
Hi fengxiangc4852,
After modifying data transform, are you using the data page in any of the test case step?
screen shot would help to understand how you have used the data page in test case step.
Updated: 7 Aug 2020 5:24 EDT
Pegasystems Inc.
IN
hi fengxiangc4852,
the datatransform loads the data into the data page D_pyScenerioTestData. For scenario tests, you need to modify the step, and change the value for which you want to pass the dynamic data. Replace the string value with D_pyScenerioTestData.<property name>
During scenario test execution, the datapage will be loaded with the data( mentioned in the data transform), and during that step execution dynamic data will provided (as you have modified and changed the value to be taken from data page reference)
https://collaborate.pega.com/discussion/scenario-testing-how-create-run-edit-test-cases
check Providing Dynamic data to the test case in the above URL. after updating the data transform, they have updated the step value in testcase and given a reference to the datapage value "AccountOwner"
Areteans
IN
Can we use a single scenario test case to run with multiple sets of data using D_pyScenerioTestData?