#13. Embedded Expression - Variable & JsonPath in JSON - Dynamic Payload #karateframework

preview_player
Показать описание
We can create a dynamic JSON payload in the karate framework using embedded expressions. Let's learn about it in this video.
Рекомендации по теме
Комментарии
Автор

Hey amod, Just one doubt man, in case if the id variable is commented out, when we embed that variable for a particular key and Print it, why it is giving as #idval, why cant it read the id value data from the config.js file, since the Scope of the variable is defined as global in config.js ? can you clarify the same on this Please !!

akilanramani
Автор

I have a response like the below where value 211142 value is a dynamic value and I have stored it in a variable temp how can I do schema validation of this response –
{
"success": {
"211142": {
"rest": [],
"Message": null,
"rip": "00123ABC"
}
},
"failures": {}
}
Below did not work –
{
"success": {
"#(temp)": {
"rest": [],
"Message": "#null",
"rip": "#string"
}
},
"failures": {}
}

rohitpandita