Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Rule tests also show you the rule statements of the rules that were triggered when running the test sheet to further help debug and understand the output.

You cannot have multiple separate different tests with different conditions in a single test sheet and they must be separated into separate test sheets. Alternatively, use a single test sheet which with conditions that triggers multiple rules.

Rule tests need to be incorporated and run as part of the build and pipeline unit tests.

...

  • Every rule sheet should have a rule test (except for the fixed rule sheet) with the same name of their rule sheet and a _Test suffix.
    For example: EntscheidDetailWindow_IsEnabled_Test.ert

  • Include the entities used for conditions and actions. If the entities used for condition are not included then you cannot set them. If the entities used for actions are not included then you will not see their changes. Except for entities the action creates new instances, like messages. New instances will be included.
  • Remove unused fields that have no conditions when copying entities to the input column, to keep the rule tests simple and readable (keeping in mind that some forms and datasources can have tens or even hundreds of fields).

  • Currently only use a single object instance in your test sheet. If you need multiple instances, you most likely need another test sheet (tab).
    For example: do not use multiple instances of EntscheidDSO with different values to test multiple cases. Use multiple test sheets with a single EntscheidDSO in each one.

...