Skip to main content


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

Unit testing a Parse Structured rule

Updated on January 14, 2022

You can test a Parse Structured rule directly, separate from the activity or other context in your application in which the rule ultimately operates. By unit testing your Parse Structured rules, you avoid configuration errors and improve application maintenance.

Before you begin:
  1. Create a Parse Structured rule. For more information, see Creating a Parse Structured rule.
  2. Review the basics of unit testing. For more information, see Unit testing individual rules.

For a simple test, obtain an XML document that contains test data. You can choose to manually enter or paste the document data into a form, store it in a local Windows file, or upload it into a Text File rule.

  1. Save the Parse Structured form that you want to unit test.
  2. Click ActionsRun.
    Result: A guided test window opens.
  3. In the Thread field, select Standard or Test to indicate the source of the test data.
  4. In the Page field, select one of the following options:
    • Empty test page – To use a new empty page to provide input property values for the test.
    • Copy existing page – To use an existing page to provide input property values for the test.
  5. If you select Test and Copy existing page in steps 3 and 4 respectively, in the Page to copy field, enter the existing page that you want to copy to provide the input property values to test.
  6. To set values for the test page, click Apply data transform.
    Clicking this option allows for a reusable and expedited method of making decisions and calculating values.
  7. Click Run.
    Result: The resulting parsed XML document appears in a new window. The clipboard is unaltered.

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