Slackbot
09/07/2023, 6:34 PMAaron
09/07/2023, 7:06 PMjaspal singh
09/07/2023, 7:40 PMjaspal singh
09/07/2023, 7:41 PMjaspal singh
09/07/2023, 7:42 PM{
"request": {
"method": "GET",
"url": "/body-file"
},
"response": {
"status": 200,
"bodyFileName": "path/to/myfile.xml"
}
}
jaspal singh
09/07/2023, 7:43 PMAaron
09/07/2023, 7:43 PMbodyFileName
is only available to the response object. Usually, the requests would have something more specific than the entire request body that differentiate them.
Are your request bodys unique in specific ways that you can tell one request from another without matching the entire body? JSON example:
// request 1
{
"id": 1234,
...
}
vs.
// request 2
{
"id": 0987,
...
}
jaspal singh
09/07/2023, 7:45 PMjaspal singh
09/07/2023, 7:48 PM{
"request": {
"method": "GET",
"url": "/body-file"
"body": "add the xml content here??"
}
jaspal singh
09/07/2023, 7:48 PMAaron
09/07/2023, 7:48 PMbodyPatterns
, but I’m not suggesting hardcoding the entire body.jaspal singh
09/07/2023, 7:49 PMAaron
09/07/2023, 7:49 PMjaspal singh
09/07/2023, 7:51 PMjaspal singh
09/07/2023, 7:51 PMjaspal singh
09/07/2023, 7:52 PMAaron
09/07/2023, 7:55 PM{
"request": {
...
"bodyPatterns" : [ {
"matchesXPath" : "/customers/customer/@id = \"55000\""
} ]
...
},
...
}
Aaron
09/07/2023, 7:55 PMjaspal singh
09/07/2023, 7:56 PMAaron
09/07/2023, 8:06 PM"bodyPatterns": [
{
"matchesXPath": {
"expression": "//customers/customer/@id",
"equalTo": "55000"
}
}
]