ContextΒΆ
The context is the runtime state container for a case. Context variables are accessible to instructions and can be used for dynamic behavior in test cases. Context variables can be defined at the case level, step level, or imported from templates.
It holds:
Case-level variables (defined by
varsin a case)Case parameters (defined by
paramsin a case)Template parameters (defined by
paramsin a template)Environment variables (defined by
envsin a case or a template)Step-level variables (defined by
varsin a step)Step results (stored in
resultby default)Exported values
Deferred expressions
Each case has its own isolated context.
Instructions such as !var result.status are compiled at parse time
but executed at runtime. Deferred evaluation allows instructions to access
the current state of the context when they are executed, rather than when
they are defined.
Deferred evaluation allows:
Accessing results of previous steps
Chained transformations
Late binding of values
Context-aware resolution
Evaluation order is deterministic and follows step order.