Friday, February 19, 2016

Jmeter - Answer Assertion To Assert Answer Message

| Friday, February 19, 2016
Earlier nosotros learnt how to role reply assertion inwards your jmeter software charge exam to assert reply code of asking inwards my previous post. So forthwith you lot already aware close how response assertion works. Here nosotros volition run into event on how to role reply assertion inwards your software charge exam to assert reply message.

Example : Assert Response Message Using Response Assertion
I accept prepared uncomplicated event on how to assert reply message of asking using reply assertion. If HTTP request has been succeeded thence nosotros volition become reply message OK.

We volition assert reply message for bellow given ii requests.
  1. newtours.demoaut.com(Valid URL which returns reply message : OK)
  2. newtours1.demoaut.com(Invalid URL which returns reply message : Non HTTP reply message)
All other configuration is same every bit described inwards my PREVIOUS POST except reply assertion configuration. Configuration of reply assertion for both requests is every bit bellow.
  • Apply To = Main Sample only.
  • Response Field to Test = Response Message.
  • Pattern Matching Rules = Contains.
  • Pattern To Test = OK.


Note : Both assertions accept same configuration inwards in a higher house software charge exam plan.

Now if you lot run inwards a higher house event software charge exam plan, Assertion results for both requests volition expect similar bellow.


In number you lot tin dismiss run into that assertion of valid asking is dice every bit reply message is received "OK" but assertion of invalid asking is failed every bit reply message received "Non HTTP response".

This agency you lot tin dismiss assert reply message of asking using reply assertion inwards software charge exam plan.

Related Posts