I have request something similar to the below each using first 3 characters of a name, Ex: WAL.

It results in 3 responses:


I have to include response assertion to validate the above 3 names:

Note: this is dynamic. For the above results, it is 3 For some it might fetch 1, 2, 4 etc. Could anyone please tell me how to validate this?

  • You can validate with the help of regular expression extractor and confirm.
    – Bhavani
    Dec 22, 2017 at 16:47
  • I have to validate multiple attrbutes. In the above scenario if search yields multiple names with address details like address line, line2,city,zip code etc. How to validate this
    – Vrishjana
    Dec 23, 2017 at 15:51

1 Answer 1


I can see 2 options:

  1. You use the same test against the same test data, it means that you will be getting the same responses each time. This is preferred way of designing your test as it needs to be repeatable otherwise even if you detect an issue and cannot reproduce it by running the same test this test doesn't make a lot of sense.
  2. If you cannot afford having static data for some reason you can consider doing some preparation in setUp Test phase or directly before the request. For example if the system under test makes a database query in order to return search results you can execute the same query using i.e. JDBC PreProcesor to pre-populate expected data set

Also your response looks utterly like XML so it might be easier to consider using XPath Assertion instead of the Response Assertion in order to validate the data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.