cancel
Showing results for 
Search instead for 
Did you mean: 

Question: Assert from SOAP response

Highlighted
Contributor

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 1
Highlighted
Super Contributor

Re: Question: Assert from SOAP response

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
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Check out this week's challenge!

Create a script to generate an email when an assertion fails for the TechCorner tag!


Scripts created in July:
- A script to change the request body before sending it to the server
Top Kudoed Authors