To create a test template, define the "Given" and "Expect" columns by using the expression editor below.



Clear

To start off, right-click a cell in the table and use the contextual menus to insert new columns and rows.

Before defining the individual test scenarios, set the instance and field mappings for each column. Select a header cell and in the Test Editor tab, choose the required field. Click Add to set the mapping.

Now, define the test scenarios. Each cell of the table must contain a valid expression.

Rule-based scenarios

In rule-based scenarios, the following expressions are supported:

  • = (or no symbol) specifies equality of a value. This is the default operator of each column and the only operator that is supported in the GIVEN section of the table.
  • !, !=, <> specify inequality of a value. This operator can be combined with other operators.
  • <, >, <=, >= specify a comparison: less than, greater than, less or equals than, and greater or equals than.
  • [value1, value2, value3] specifies a list of values. If one or more values are valid, the scenario definition is evaluated as true.
  • expression1; expression2; expression3 specifies a list of expressions. If all expressions are valid, the scenario definition is evaluated as true.
  • An empty cell equals to null. To define an empty string, use =.

Example expressions:

  • < 1
  • < 1; ! [-1, 0]
  • [Jane, Doe]
  • <> [1, -1]; = 0

DMN-based scenarios

DMN-based scenarios use the FEEL expression language. Supported data types are:

  • numbers and strings (strings must be delimited by quotation marks), for example "John Doe"
  • boolean values (true, false, and null)
  • dates and time, for example date("2019-05-13") or time("14:10:00+02:00")
  • functions
  • contexts, for example {x : 5, y : 3}
  • ranges and lists, for example [1 .. 10] or [2, 3, 4, 5]