admin管理员组文章数量:1356595
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.
版权声明:本文标题:karate - Can I pass variable values from another file in the step response.validation contains? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744042880a2580988.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论