assertion

soapUI pro announcements and discussions

assertion

Postby NYefimov » 13 Sep 2007 17:45

Ole,

how would you implement an assertion against a value in the property step?
Can it be done in a XPath Match assertion (without groovy script ) something like this? (I just copied from XPath assertion)

declare namespace ns1='http://services.tvguide.com/v2.5/common/types';
declare namespace ns2='http://services.tvguide.com/v2.5/listings';
//ns2:GetProgramDetailsResponse/ns2:GetProgramDetailsResult/ns1:ClientBatchId

data.ClientBatchId

where data is a property step name
and ClientBatchId is the property name

(basically how would you refer to your property in a standard XPath assertion?)

How would you do that with groovy?

Thanks
NYefimov
soapui pro users
soapui pro users
 
Posts: 15
Joined: 02 Aug 2007 10:19

Re: assertion

Postby omatzura » 13 Sep 2007 22:39

Hi Nick,

you should be able to do the following:

xpath:

declare namespace ns1='http://services.tvguide.com/v2.5/common/types';
declare namespace ns2='http://services.tvguide.com/v2.5/listings';
//ns2:GetProgramDetailsResponse/ns2:GetProgramDetailsResult/ns1:ClientBatchId/text()

expected value:
${data#ClientBatchId}

where "data" is the name of your Properties Step and "ClientBatchId" the name of the property.

Hope this helps!

regards,

/Ole
eviware.com
omatzura
Administrator
Administrator
 
Posts: 1918
Joined: 05 Jan 2007 23:39

Re: assertion

Postby NYefimov » 13 Sep 2007 23:00

Ole,

thanks. It works
NYefimov
soapui pro users
soapui pro users
 
Posts: 15
Joined: 02 Aug 2007 10:19


Return to soapUI Pro Support