Forum Discussion

minosu's avatar
minosu
New Contributor
8 years ago

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

  • minosu's avatar
    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?

      • minosu's avatar
        minosu
        New Contributor

        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.