Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Setup and cleanup of data page unit test cases

Updated on June 27, 2016

Before you run a data page unit test case, you can set up the clipboard with initial values by using one or more data transforms, data pages, or activities. You can also use activities to create any required test data, such as work or data objects, and can use one or more data transforms or activities to remove information from the clipboard after you run the test.

Set up or clean up the clipboard if you are running a test for which the output or execution depends on other data pages or information. Click the Setup & Cleanup tab on the data page unit test case page to configure setup and cleanup information.

Setup & Cleanup tab

Setup & Cleanup tab

For example, when you run a test, you can use a data transform to set the values of the pyWorkPage clipboard page with the AvailableDate, ProductID, and ProductName properties. Before the test runs, these values are retrieved from pyWorkPage and placed on the data page that you are testing.

pyWorkPage clipboard page with setup data transform applied

pyWorkPage clipboard page with setup data transform applied

After you run a data page unit test case, data pages that were used to set up the test environment are automatically removed. You can also apply additional data transforms or activities to remove other pages or properties from pages on the clipboard before you run more tests. Cleaning up the clipboard ensures that data pages or properties on the clipboard do not interfere with subsequent tests.

For example, you can use a data transform to clear the AvailableDate, ProductID, and ProductName properties from the pyWorkPage clipboard. Clear these values to ensure that the test uses the appropriate information if the setup data changes for subsequent test runs. If you change the value of the AvailableDate to May 2016, the data page uses that value, not the older value (December 2016).

pyWorkPage with cleanup data transform applied

pyWorkPage with cleanup data transform applied

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us