Forum Discussion

JMcKinley's avatar
JMcKinley
Contributor
16 years ago

Question: Assert from SOAP response

I have a question about the assertions associated with a SOAP request...

The response I get for a request has several pieces of information in it... let's say, for example, SOAP returns the value for a field called key as 1...

I can create a "contains" assertion (for the request) and enter 1 in that assertion; however, using a contains does not guarentee that the 1 in the response for the request is the key value.

How can I create an assertion (for that SOAP request in my test case) that evaluates that the key is 1...

Thanks!
Jim

1 Reply

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    try using an XPath assertion instead, where you specify the xpath to your element/attribute containing the key value. In that cause you wont be asserting any other content of your response "by mistake"..

    hope this helps!

    regards,

    /Ole
    eviware.com