Ask a Question

Schema assertion: change WSDL url programmatically/with a property transfer

minosu
New Contributor

Schema assertion: change WSDL url programmatically/with a property transfer

I can't seem to find a way to do this. Our SOAPUI Project can be used to test the application n different servers, so this needs to be changeable.

 

I've been looking at this: https://www.soapui.org/apidocs/com/eviware/soapui/model/testsuite/TestAssertion.html

 

But I can't find any setting/config property with the WSDL url. Closest thing is the .configure() which pops up an input box. But this is useless when you have hundreds of test cases to get through.

4 REPLIES 4
kondasamy
Regular Contributor

Do you wish to change the common Endpoint for all the methods in your project? If so, you can make you use of the Environment manager feature available in Ready API - http://readyapi.smartbear.com/readyapi/environments/introduction

 

Please mention if I have misunderstood your problem.

 

Thanks,

Kondasamy

minosu
New Contributor

I don't know what ReadyAPI is, I am on SoapUI 5.2.1, which I seems to exclude environment settings.

 

Shouldn't this be available to a Groovy script?

kondasamy
Regular Contributor

Since you have posted in SoapUI NG (Ready API) forum, it made me to assume that you are using Pro version. This question should actually got to open source forum.

 

Anyhow, the situation can be handled by Groovy script; please check the post here - https://community.smartbear.com/t5/SoapUI-Open-Source/Environment-handling/m-p/107655/highlight/true...

 

Thanks,

Kondasamy

Yes, we already use Groovy script to set the endpoint of HTTP/SOAP calls.

 

def project = testRunner.testCase.testSuite.project
def call = testRunner.testCase.testSteps["call"]

def url = project.getPropertyValue("server")
def endpoint = new URI(call.getPropertyValue("endpoint"))
def wholeUrl = url + endpoint.getPath()
call.setPropertyValue("endpoint", wholeUrl)

 

However, I can't seem to find any API to set the endpoint of a schema compliance assertion. The configuration and settings objects appear to be empty, and .configure() opens a popup for the user to enter the URL -- and won't accept a URL parameter programmatically.

cancel
Showing results for 
Search instead for 
Did you mean: