You are here: Reference > Rule types > Declare Expressions > Unit testing Declare Expression rules with data transforms

Unit testing Declare Expression rules with data transforms

Instead of manually changing property values, you can create and run a data transform that sets the values defining a test case.

  1. Save the Declare Expression rule form.
  2. Select Actions > Run.
  3. From the Data Context list, select the context in which to run the test.
  4. Specify a data transform to run by clicking the hyperlink.

  5. Click Reset Page to discard all previous test results. An empty test page is re-created, and your data transform reinitializes your specified values.

  6. Repeat steps 4 through 5 with other data transforms, or alter the clipboard contents and repeat the test.
  7. If the unit test of the Declare Expression rule requires creating an input that is part of an embedded Page List or Page Group property, create a new page. You can also add inputs to Value List or Value Group properties.