Forum Discussion

mahesh_avinash1's avatar
mahesh_avinash1
Occasional Contributor
8 years ago

How to compare JMS response in soapui using groovy script

 

I want to compare response element with expected output and save this result into result file.

expected output:

CustomerId=CUSTOMER_ID10

 

response:

 

CustomerId=CUSTOMER_ID11

 

then result file should have CustomerId=fail

 

It's JMS response:

 

<?xml version="1.0" encoding="utf-8"?>
<Service>
<CustomerId>CUSTOMER_ID10</CustomerId>
<Community>SEPAMAIL</Community>
<Service>RUBIS</Service>
<Register>false</Register>
<Actor>Actor</Actor>
</Service>

 

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3
    You can use xpath assertion and put whatever value you are expecting.
    xpath -
    //*:CustomerId/text()