cancel
Showing results for 
Search instead for 
Did you mean: 

How to do assertion for the X-path where the responsevalues keeps on changing for the same test data

Highlighted
New Contributor

How to do assertion for the X-path where the responsevalues keeps on changing for the same test data

How to do assertion for the Xpath where the values keeps on changing for the same test data ?

 

i need to validate all the fields under WebPropositionModel against some expected data , iam not sure of the position whr the expected value will get populated ? is there any way to do it 

 

sample response below

<n2:WebResponseModel>
<n2:behaviour>positive</n2:behaviour>
<n2:label xsi:nil="true"/>
<n2:responseUrl xsi:nil="true"/>
<n2:responseValue>Maybe</n2:responseValue>
<n2:visible>false</n2:visible>
</n2:WebResponseModel>
<n2:WebResponseModel>
<n2:behaviour>negative</n2:behaviour>
<n2:label xsi:nil="true"/>
<n2:responseUrl xsi:nil="true"/>
<n2:responseValue>Declined</n2:responseValue>
<n2:visible>false</n2:visible>
</n2:WebResponseModel>
</n2:responses>
<n2:skuCode>0</n2:skuCode>
<n2:type>Links</n2:type>
<n2:visible>true</n2:visible>
</n2:WebPropositionModel>
<n2:WebPropositionModel>
<n2:clickBehaviour>neutral</n2:clickBehaviour>
<n2:clickResponseValue>web clicked</n2:clickResponseValue>
<n2:id>evol_pre_my_o2</n2:id>
<n2:name>Customer is not active in My O2</n2:name>
<n2:pictureUrl xsi:nil="true"/>
<n2:rank>2</n2:rank>
<n2:respondToClick>false</n2:respondToClick>
<n2:responses xsi:type="n2:ArrayOfWebResponseModel">
<n2:WebResponseModel>
<n2:behaviour>positive</n2:behaviour>
<n2:label xsi:nil="true"/>
<n2:responseUrl xsi:nil="true"/>
<n2:responseValue>Maybe</n2:responseValue>
<n2:visible>false</n2:visible>
</n2:WebResponseModel>
<n2:WebResponseModel>
<n2:behaviour>negative</n2:behaviour>
<n2:label xsi:nil="true"/>
<n2:responseUrl xsi:nil="true"/>
<n2:responseValue>Declined</n2:responseValue>
<n2:visible>false</n2:visible>
</n2:WebResponseModel>
</n2:responses>
<n2:skuCode>0</n2:skuCode>
<n2:type>Links</n2:type>
<n2:visible>true</n2:visible>
</n2:WebPropositionModel>
<n2:WebPropositionModel>
<n2:clickBehaviour>neutral</n2:clickBehaviour>
<n2:clickResponseValue>web clicked</n2:clickResponseValue>
<n2:id>evol_pre_tablet_refresh_samsung</n2:id>
<n2:name>Customer doesn't have a tablet or iPad</n2:name>
<n2:pictureUrl xsi:nil="true"/>
<n2:rank>3</n2:rank>
<n2:respondToClick>false</n2:respondToClick>
<n2:responses xsi:type="n2:ArrayOfWebResponseModel">
<n2:WebResponseModel>
<n2:behaviour>positive</n2:behaviour>
<n2:label xsi:nil="true"/>
<n2:responseUrl xsi:nil="true"/>
<n2:responseValue>Maybe</n2:responseValue>
<n2:visible>false</n2:visible>
</n2:WebResponseModel>
<n2:WebResponseModel>
<n2:behaviour>negative</n2:behaviour>
<n2:label xsi:nil="true"/>
<n2:responseUrl xsi:nil="true"/>
<n2:responseValue>Declined</n2:responseValue>
<n2:visible>false</n2:visible>
</n2:WebResponseModel>
</n2:responses>
<n2:skuCode>0</n2:skuCode>
<n2:type>Links</n2:type>
<n2:visible>true</n2:visible>
</n2:WebPropositionModel>
</n2:topPropositions>
</n1:result>
</m:getTopPropositionsResponse>
</env:Body>
</env:Envelope>

2 REPLIES 2
Highlighted
Community Hero

Re: How to do assertion for the X-path where the responsevalues keeps on changing for the same test

Are you using soapui or readyapi?


Regards,
Rao.
Highlighted
New Contributor

Re: How to do assertion for the X-path where the responsevalues keeps on changing for the same test

I use both , please if possible can you give the solution for soapui and readyapi?

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
The new challenge is here!

Create a script to сhange an XPath Match assertion to a JSONPath Match assertion for the TechCorner tag!


Scripts created in July:
- A script to generate an email when an assertion fails
- A script to change the request body before sending it to the server
Top Kudoed Authors