I have to compare two json response as successful response in JMETER.
For example either I will get a response with values,
[
{
"id": 423082,
"createdBy": 10000,
"createdOn": "03/11/2016 12:04 PM"
},
{
"id": 423083,
"createdBy": 10001,
"createdOn": "06/11/2016 12:04 PM"
}
]
OR I will get an empty json []
Both are successful results for me.
How can I compare these results in Response Assertion or JSON Path Extractor as successful results.
\[(\{.*\})*\]
- checks whether it's a JSON array with 0 or more objects inside. But it can be as fancy as checking whether date is valid and so on... – Kiril S.