Forum Discussion

JessicaSeebär's avatar
JessicaSeebär
New Member
7 months ago

How to compare actual SOAP response with known expected SOAP response?

Hi guys!

We are going to make technical changes in our soap services, that should not affect the business logic.

Therefore I'm collecting requests and corresponding responses for these webservices. With these I would like to build a testsuite with assertions, that compare the actual response after having made the technical changes with the previous saved expected response - both as xml.

What I already know is that the namespaces will differ, what ist no problem. So I would like to ignore those namespaces. 

This is the reason why a simpe "contains" assertion won't work.

Are there any recommendations how to create such an assertion?

Thanks for your help!

 

Greetz Jessica

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    Suggest below thread for a reference to compare two xmls

    https://github.com/nmrao/soapUIGroovyScripts/blob/master/groovy/compare/CompareTwoDiffXmls.groovy

  • ChrisAdams's avatar
    ChrisAdams
    Champion Level 3

    Hi,

    Simple ReadyAPI assertions window has an ignore namespaces checkbox.

  • nmrao's avatar
    nmrao
    Champion Level 3

    Please provide the following:

    How are`you currently doing the comparison?

    Is there an error after the changes?

    Can you please elaborate on namespace changes?

    Do you have any sample data (need not be exact) of both actual and expected?