In match response.validation contains, is it possible to check the value that changes depending on the environment? I have data.json file with values for fields which change depends on env.
I have request with json:
And request
"""
{
"product": {
"name": '#(data.name)'
}
}
"""
and step:
Then match response.validation contains
"""
{
"product": {
"name": '#(data.name)'
}
}
"""
This
data.name
value will change depending on the environment, at the moment such a test does not pass because in response from API I have string in
"""
{
"product": {
"name": 'test data'
}
}
"""
and the comparison is to '#(data.name)' should be to 'test data'
In match response.validation contains, is it possible to check the value that changes depending on the environment? I have data.json file with values for fields which change depends on env.
I have request with json:
And request
"""
{
"product": {
"name": '#(data.name)'
}
}
"""
and step:
Then match response.validation contains
"""
{
"product": {
"name": '#(data.name)'
}
}
"""
This
data.name
value will change depending on the environment, at the moment such a test does not pass because in response from API I have string in
"""
{
"product": {
"name": 'test data'
}
}
"""
and the comparison is to '#(data.name)' should be to 'test data'
Share Improve this question asked Mar 28 at 10:32 declutecdeclutec 435 bronze badges1 Answer
Reset to default 1My mistake, it's OK, the error was in another place....
It works fine to pass the value of a variable from another file.