How to unit test a Parse XML rule
|
|
You can test a Parse XML rule directly, separate from the activity or other context in your application in which it will ultimately operate. C-2434
Preparation
For a simple test, obtain an XML document containing test data. You can choose to type or paste the data into a form, store it in a local Windows file, or upload it into a text file rule.
Conducting the test
For basics of unit testing, see Unit testing a rule with the Run toolbar button.
- Save the Parse XML form.
- Click the Run toolbar button (
) or the equivalent keyboard shortcut CTRL
+ R
. A test window opens.
- Select a radio button to indicate the source of test data.
- If the data is to be entered directly, type or paste the data into the text area. If the data is in a local file, click Browse and navigate to the file. Click OK . If the test data is in a text file rule, enter all three key parts of the rule separated by periods.
- Click Execute . A resulting XML document appears in a new window, showing properties and the corresponding values. The clipboard is not altered. B-21471
Using the Tracer
To trace Parse XML rules, select the Parse Rules check box in the Rule Types to Trace area of the Trace Options panel. See Tracer — Setting Options.
About Parse XML rules