Inspiration
If you have some data in your application, how often do you need some kind of reporting on them, including search, filtering or just plain listing?
Reports in Pega are widely used to work with data so typically there is a significant reports maintenance required.
How can you ensure that reports stay correct when changed?
That's right, Pega unit testing can help with this!
However, Reports are bound to the database and thus reports testing is not so easy since appropriate data is needed.
What it does
DataSnap component introduces new Rule type - a Data Snapshot which becomes available in a Data Model category.
Data Snapshot rules allow to define and maintain test data for a target Class, allowing to deliever these data and to use it with a Pega Unit to unit test Report Definitions and functionality built on top of them.
The component is easy to install and use - just add the component to your Testing application and you would be able to create and use Data Snapshots for application classes.
How we built it
New rule type was created, it allows to create and maintain test data for a target Class in a familiar way like you do it with any other rule.
Data Snapshot allows to define properties that need to be populated and to specify test data for them. It means that a particular Class can have a number of Data Snapshots covering various test scenarios.
Challenges we ran into
It was unclear how to integrate data load into a Pega Unit. Data load API was created to allow data load from Pega Unit.
Accomplishments that we're proud of
The solution is simplifying one of the complex areas that is typical for any Pega project.
What we learned
Even a complex problem can have an elegant solution if it's approached in a smart way.
What's next for Rule DataSnap
Component would be published on the Pega Marketplace to make it available for the Pega Community.
Built With
- pega
- pegaunit






Log in or sign up for Devpost to join the conversation.