Legacy Configurations¶
The Legacy
configuration block is a container for switches that maintain backwards compatibility.
These configurations allow for accessing legacy intaQt behavior. The following two configurations are available:
-
Isolate Steps/UI Steps Language Contexts - Disables shared scenario execution context and isolates UI Steps and Steps sub-contexts.
-
Treat
{ident}
parameters as{raw}
parameters - When active,{ident}
parameters will be treated like{raw}
.
Legacy Configurations |
---|
Isolate Steps/UI Steps Language Contexts |
Treat {ident} Parameters as {raw} Parameters |
Isolate Steps/UI Steps Language Contexts ¶
intaQt's default behavior is a shared execution context between sub-languages (UI Steps and Steps). For example, a function or context object written in Steps can be accessed in UI Steps, and a function or context object written in UI Steps can be accessed in Steps.
The useIsolatedContexts
configuration disables this shared scenario execution context, for example, it isolates UI Steps and Steps sub-contexts.
Important! Isolated contexts are a legacy behavior and should not be used except in rare cases of backwards compatibility. To avoid errors, use intaQt's default behavior.
Syntax
1 2 3 | Legacy = { useIsolatedContexts = <Boolean> } |
Parameter
- useIsolatedContexts -
true
isolates the Steps and UI Steps scenario execution contextsfalse
(default) shares the Steps and UI Steps scenario execution contexts
Example
1 2 3 | Legacy = { useIsolatedContexts = true } |
Test Case Example with Isolated Contexts¶
In the example below, the isolated behavior (useIsolatedContexts = true
) is used. A Steps function writes a variable to the context that is verified from within a Feature File:
1 2 3 4 5 6 7 8 9 | stepdef "use context" UseContext.putIntoContext("hello", "world") end model UseContext func putIntoContext(name, value) setContextObject(name, value) end end |
The associated Feature File includes a variable (soap.hello
) prefixed with soap.
to indicate that the Steps sub-context is accessed:
1 2 3 4 5 6 7 | Feature: UseContextIsolate Scenario: UseContextIsolate # Prerequisites Given use context And verify soap.hello == "world" |
Test Case Example with Shared Contexts¶
In the example below, the default isolated behavior (useIsolatedContexts = false
) is used. A Steps function writes a variable to the context that is verified from within a Feature File:
1 2 3 4 5 6 7 8 9 | stepdef "use context" UseContext.putIntoContext("hello", "world") end model UseContext func putIntoContext(name, value) setContextObject(name, value) end end |
Its associated Feature File includes a variable (hello
). Unlike the example for the isolated contexts, the variable below does not require a soap.
prefix, because the default shared context is enabled.
Example
1 2 3 4 5 6 7 | Feature: UseContextShare Scenario: UseContextShare # Prerequisites Given use context And verify hello == "world" |
Treat {ident}
Parameters as {raw}
Parameters ¶
intaQt's default behavior is for {ident}
parameters to only match identifiers such as a phone's identifier or the name assigned to an event. These parameters must start with an Alpha character.
When treatIdentAsRaw
is set to true
, all {ident}
parameters are instead treated as {raw}
parameters, meaning non-identifiers (such as an IP address) will also be matched.
Syntax
1 2 3 | Legacy = { treatIdentAsRaw = <Boolean> } |
Parameter
- treatIdentAsRaw
true
means{ident}
parameters are treated as{raw}
false
maintains intaQt's default behaviour and only matches identifiers against{ident}
parameters
Example
1 2 3 | Legacy = { treatIdentAsRaw = true } |