2021 September Release

Defining a Unit TestPermanent link for this heading

The basic element of the unit test language is the unit test itself. Every unit test can have global variables, an optional setup expression, a test expression and an optional cleanup expression. Additionaly some test contents can be assigned to the unit test.


test reference {
  // global variables
  User theuser;

  init = expression {
    // optional init expression
    theuser = #User.ObjectCreate();

  expression {
    // test expression

  cleanup = expression {
    // optional cleanup expression

  testdata<tdid, tdcontent> = {
    { "word", file("resources/testdata/word.docx") }

Variables in expressionsPermanent link for this heading

All expressions share the same local scope and can see the global variables of the scenario (see below) and the global variables of the unit test.

EvaluationPermanent link for this heading

When evaluating a unit test, first the scenario is initialized if provided, then the setup expression, the test expression and the cleanup expression are evaluated. The cleanup expression is evaluated regardless of the result of the test expression.