Forum Discussion
testhrishi
9 years agoFrequent Contributor
Thank you for the input, the < length may work to cover for more than expected scenario. But it may not cover the less than expected part, right. Also some of the fields coming back in the response are new every time, hence its gets tricky to assert on specific ones
IgorG
Staff
9 years agoYou can use this code to check both minimum and maximum length:
assert ((messageExchange.response.contentLength > 10) && (messageExchange.response.contentLength < 500))
Of course, this will only work if short, normal and long messages are different enough.