String Escaping and Interpolation in Custom Languages¶
By default, intaQt recognizes escape characters such as \n, \t inside string literals and does not interpolate Strings as Template Strings. The Language configuration activates and deactivates the following:
-
Escape mechanisms in Steps files
-
String Interpolation in Steps files
-
Escape mechanisms in UI Steps files
-
String interpolation in UI Steps files
Additional information and examples are available in:
Syntax
1 2 3 | interpretStringEscapes = <Boolean> interpolateWebtestDefinitions = <Boolean> interpolateStrings = <Boolean> |
-
interpretStringEscapes
true(default) controls the escaping mechanism inside strings- For example,
/'would be converted to', or\"would be converted to"
- For example,
falseuses intaQt's default escape characters
-
interpolateStrings
true(default) activates string interpolationfalsewill not treat Strings as Template Strings, even if they containevalgroups
-
interpolateWebtestDefinitions
true(default) evaluates string Expressions in UI Steps View definitions- The expressions must start with a
$instead of@
- The expressions must start with a
falseevaluates string Expressions in UI Steps View definitions- The expression should start with a
@
- The expression should start with a
Example
1 2 3 | Language { interpretStringEscapes = true } |
Note:
The false configuration for interpolateWebtestDefinitions is deprecated, but defaults to false for backwards compatibility.
Important! If the implementation in the project assumes the character escapes are not interpreted in a String, test cases might break in an unexpected manner!