Unit testing a Parse Structured rule
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.
- Create a Parse Structured rule. For more information, see Creating a Parse Structured rule.
- 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.
- Save the Parse Structured form that you want to unit test.
- Click .
Result: A guided test window opens.
- In the Thread field, select Standard or Test to indicate the source of the test data.
- 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.
- 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.
- 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.
- Click Run.
Result: The resulting parsed XML document appears in a new window. The clipboard is unaltered. Previous topic Using the Steps tab on the Parse Structured form Next topic Map Structured rules