Context

A test runs in a context. This context can be considered an environment that isolates information related to one test from information related to another test.

Among other things, the context contains information on these items:

  • Variables
  • Current company
  • Current role
  • Started session(s)
  • Logger

When a test case invokes another test case or a test script, a context is created for that new script. On initialization of that context, the variables of the script are initialized with the arguments passed by the calling test case, if any.

If the script must run in another company, this company is also stored in the context. Otherwise the company of the caller is inherited.

In preparation of the execution of the script, a logger is created for the script. All log output is sent to this logger, so afterwards the log can be precisely matched with the script that generated it.

After the script has completed its execution, the arguments that have the In and InOut scope are updated with the corresponding variables. This way information can be passed from the invoked script to the caller. The execution result, such as failed or succeeded, is passed to the caller. Finally, the context is removed and the caller continues its execution with the next instruction, if any.