Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
16 years ago

Update WSDL via groovy

Hello,
I notice that some engineers forget to update the WSDL with new release and this can cause some holes in testing. I am trying to use the coverage report feature to point out testing holes. However, I am guessing, that if the WSDL in the project is old then the coverage report will compare the test case coverage with the old wsdl rather than what is on the server.

Is it possible to update the wsdl via groovy? I can then specify this code in my project load script which would first update the wsdl and then run any test and then generate the coverage report against the new WSDL.

Thanks

Ali

1 Reply

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Ali,

    yes, try the following in your script:

    // get the desired interface
    def iface = project.interfaces["..."]

    // the url to update from
    def url = iface.definition

    // update
    iface.updateDefinition( url, createRequests )


    The "createRequests" boolean tells if soapUI should generate default requests for new operations.

    regards!

    /Ole
    eviware.com