Forum Discussion

Awesome's avatar
Awesome
Frequent Contributor
17 years ago

how to 'bulk' add 'assert exsists

hi all,

please see attached image.

i'm adding the 'assert exists' for each returned element in the response.

there are 100+ elements in this response and i'd like to add an 'assert exists' for each so that i can test that the response is returning all the correct elements.

Question: it takes a long time to add 'assert exists' for each element, is there a faster / better way to do this?

Thanks in advance for your help!

1 Reply

  • Hello,

    Unfortunately, there isn't really a good way of doing this.
    One possibility is to add one assertion that checks the entire XML, and to use wildcards to ignore the actual values.
    This will only work if all elements in the selected block of XML are to be checked though, you can't wildcard an element, only its value.

    Regards,
    Dain