Forum Discussion
omatzura
18 years agoSuper Contributor
Hi Sachin,
actually there is a possibility to add your own data to the internal information agreggated for coverage (but it is a bit cumbersome..);
1. Put your script in a Script Assertion for the corresponding Request
2. The context contains an object for gathering asserted xpaths;
def assertedXPathsContainer = context.getProperty( com.eviware.soapui.impl.wsdl.support.assertions.AssertedXPathsContainer.ASSERTEDXPATHSCONTAINER_PROPERTY )
3. get a reference to the containing script assertion (required in the next step)
def scriptAssertion = messageExchange.request.getAssertionByName( "" )
4. now add each item that you have asserted to this container
def assertedXPath = new com.eviware.soapui.impl.wsdl.support.assertions.AssertedXPathImpl( scriptAssertion,, )
assertedXPathsContainer.addAssertedXPath( assertedXPath )
You can use XmlUtils.createXPath( node ) to construct an XPath expression from a given node and XmlObject.Factory.parse( node ) to create the corresponding XmlObject..
Hope this helps!
regards,
/Ole
eviware.com
actually there is a possibility to add your own data to the internal information agreggated for coverage (but it is a bit cumbersome..);
1. Put your script in a Script Assertion for the corresponding Request
2. The context contains an object for gathering asserted xpaths;
def assertedXPathsContainer = context.getProperty( com.eviware.soapui.impl.wsdl.support.assertions.AssertedXPathsContainer.ASSERTEDXPATHSCONTAINER_PROPERTY )
3. get a reference to the containing script assertion (required in the next step)
def scriptAssertion = messageExchange.request.getAssertionByName( "
4. now add each item that you have asserted to this container
def assertedXPath = new com.eviware.soapui.impl.wsdl.support.assertions.AssertedXPathImpl( scriptAssertion,
assertedXPathsContainer.addAssertedXPath( assertedXPath )
You can use XmlUtils.createXPath( node ) to construct an XPath expression from a given node and XmlObject.Factory.parse( node ) to create the corresponding XmlObject..
Hope this helps!
regards,
/Ole
eviware.com