Forum Discussion
IgorG
Staff
9 years agoYou seem to try to do several things in one assertion.
Here is how you can try and assert the response::
- Use Message Content assertion to verify the contents of the response. With it you can configure what information you expect in specific response field.
- Use Script assertion to verify response lenght. Depending on your response, there are multiple ways to do this. The simplest one is checking response lenght:
assert messageExchange.response.contentLength < 500
This is obviously very basic, a script should be custom for what you expect in your response. You can, for example, get a response as XML, count the number of specific nodes in it and fail the assertion if there are too many.