Forum Discussion

Chowdhary's avatar
Chowdhary
Contributor
8 years ago
Solved

Xpath Match Configuration

Hi Friends,

 

I have a request in soap and my response is having 500 response values, if i want to use the X-path expression to match my responses, i can do it for 1 value in response, but if i want to match all the 500 values in response with Xpath, how can i do it ?

  • Xpath Assertion allows one to check one value. That way it is clear which value check is failed.

    If you want to do more, like 500, it is difficult to create manually 500 assertions. So you can use below two options:

    1. use script assertion instead of xpath. Are you expecting a list of values for the same xpath, by the way?

    2. use groovy script which can create 500 or whatever number of xpath assertions for the required test step.

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3

    Xpath Assertion allows one to check one value. That way it is clear which value check is failed.

    If you want to do more, like 500, it is difficult to create manually 500 assertions. So you can use below two options:

    1. use script assertion instead of xpath. Are you expecting a list of values for the same xpath, by the way?

    2. use groovy script which can create 500 or whatever number of xpath assertions for the required test step.