Unit Test Rule auto cleanup not working for data table, but it is for work table
Using Pega Unit Test Rules, we are creating DB objects in the Setup Data to then use during rule execution and interrogate in our assertions. Then OOTB in the Cleanup we have the checkbox ticked that auto cleans up all data that was created during the Setup.
We have seen that for Work level DB objects this works as expected and the DB records are cleaned. However I have a Data table, with different keys (not pyID) and this is not auto cleaned up after the Unit Test has run.
I was wondering whether there was some restrictions on the functionality of this auto clean up based on keys? Or based on other factors?
Any help much appreciated
***Edited by Moderator: Lochan to update platform capability tags***
If the class of data table extends from Data- class, cleanup should work fine similar to classes extending Work-. pzInsKey of the work and data records is used internally to track and cleanup the items, so it is not dependant on pyID specifically. As you may know, cleanup happens only for items which get newly created during execution of the test case.
Keep up to date on this post and subscribe to comments
- pc_work table, work object not showing up
- How can i create users from the data in my user table, need to create multiple users with different roles.
- How to insert a new row into a SQL table, by taking data from the user(Via a Windows Form)
- Cleanup unused tables from Data schema after upgrade in Production
- Unit testing a decision table