LinkedIn
Copied!

Table of Contents

Extend PegaUnit setup and cleanup capabilities using custom fixtures (8.6)

This content applies only to On-Premises Services environments.

The PegaUnit framework allows you to set up the environments and conditions required for running a test case, determine how to clean up test data at the end of a test run, and set pages on which to automatically run rules. With custom fixtures, the setup and cleanup capabilities are now extensible, allowing you to build more configurable and comprehensive test suites. You can use this feature to define specific custom actions at the application level, such as running a test case or sending an email during setup. 

To begin with, you create an instance of the Data-TestFixtures class that defines the implementation logic for your custom action. For instance, the fixture definition below can be called during setup to run a specific test case. 

Create an instance of the Data-TextFixtures class, and define the implementation logic for your custom action.
Create an instance of the Data-TextFixtures class, defining the implementation logic for your custom action.
Create an instance of the Data-TextFixtures class, and define the implementation logic for your custom action.

 

After you save the instance, the fixture that you create appears in the Additional clipboard data section of the test case in the dropdown list. The PegaUnit frameworks calls the activity specified in the implementation logic and executes the test case. 

Implement the custom fixture by selecting it during set up.
Custom fixtures_implement
Implement the custom fixture by selecting it during set up.

 

Have a question? Get answers now.

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