I have the following scenario that matches the response against a multi-line expression that contains a variable. This variable is defined in karate-config.js
and is present because the test succeeds up to the final step.
Background:
Given url $baseUrl
Scenario: Fetch Root
Given path "/"
When method GET
Then status 200
And match header Content-Type == $halJson
And match response ==
"""
{
"_links": {
"user": {
"href": "$baseUrl/user"
}
}
}
"""
How can I get the baseUrl
variable replaced with the real value in the match response
step?