Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Correlation / Extract Element Regardless of Order in the Request

VirtEyes
VirtEyes Posts: 62

Is it possible to do a responder correlation based on a particular element and its value, regardless of its position in the Request body?

The case I am working with is where the user sends a request with the same elements, however the order randomizes each time. For example, if I am checking for the value of "Status" which is the third element, but then when they send the request it becomes the first or 5th element.

Additionally, I am capturing that elements value in a JSON data bank and parameterizing it in the response. So how would I go about capturing that element and value in the data bank, especially when the location of the element changes every time?

Comments

  • williammccusker
    williammccusker Posts: 563 ✭✭✭

    Hi,
    Using xpath correlation yes you can setup an xpath that does not care about the position. For an xpath that looks like this "/root/item/status" it should not matter if "status" if the third or fifth child of "item"

    Do you have a sample xpath and some sample xml that demonstrates the issue you are having?