Forum Discussion
nmrao
7 years agoChampion Level 3
Not sure what assertion you are using.
If the response value needs to be compared against the request value, then it is absolutely possible using Script Assertion.
The request, and response can be read in Script Assertion using below statements respectively
log.info context.request
log.info context.response
Based on the data type, parse it and extract the required chunk of data from request and response, then compare.
Hope this helps.
If the response value needs to be compared against the request value, then it is absolutely possible using Script Assertion.
The request, and response can be read in Script Assertion using below statements respectively
log.info context.request
log.info context.response
Based on the data type, parse it and extract the required chunk of data from request and response, then compare.
Hope this helps.
- groovyguy7 years agoChampion Level 1
I second what nmrao said. It sounds like a groovy script assertion may be the best way forward.
- PaulMS7 years agoSuper Contributor
I think it is easier to transfer data from the request to a property that can be used in the assertion.
You could have 2 property transfers for address line 1 and line 2 if separate fields in the request.
Related Content
- 2 years agoTaz