Scenario: I have a delegated Data Type called "Vehicle", this Data Type is associated with a lookup Data Page "D_Vehicle" with a mandatory input parameter called pyGUID.
Being the Data Type delegated, it will contain changing and temporary data (both in the Development and Staging environments).
I ran the Test Case for the Data Page having entered the key (pyGUID) of a record existing at that time in the Development environment as input having had a positive outcome (Passed).
Subsequently, when the record was no longer present, after relaunching the same Test Case I failed.
Objective: we want to automate the execution of Test Cases within a DevOps pipeline, we would like to understand how to create the latter in such a way as to always obtain "Passed" results (thus having Test Cases independent of the inputs entered being defined).
@GiulianoP0946 Setup and cleanup features of PegaUnit can be leveraged to achieve this. Instead of relying on the data already present in the DB, create the data needed by the DataPage using the Setup actions (Run Activity, DT, API etc) in Setup tab of PegaUnit and base your assertions as per the data created. This would make the testcase independent and it would work even when moved to a different environment. Following article can be referred for related info.