14

I'm using Groovy scripts as part of our SoapUI automation efforts.

I tried looking in SoapUI's website for documentation on their object model and how Groovy can be used properly within the testRunner context, but I was unable to find anything helpful yet. Since the Groovy editor SoapUI supplies does not have auto-completion, it is hard to guess which properties each object has.

Is there any good documentation about the APIs and how to use them?

RonK
  • 9,472
  • 8
  • 51
  • 87

3 Answers3

18

Please note there are TWO sets of APIs:

  1. Pro Version: http://www.soapui.org/apidocs/pro/index.html

  2. Free Version: http://www.soapui.org/apidocs/index.html

And the groovy docs: http://groovy.codehaus.org/groovy-jdk/

BlackGaff
  • 7,579
  • 1
  • 38
  • 45
  • Thanks, I missed the **Pro** documentation - I actually need those. Also, thanks for the `Groovy` JDK - that was very helpful as well. – RonK May 26 '11 at 04:26
  • You're most welcome - it took me 2 months to realize there were different docs. – BlackGaff May 26 '11 at 14:41
  • 1
    And the User Guide, for those of us new to Groovy: http://groovy.codehaus.org/User+Guide – Alan Dec 05 '13 at 19:48
3

Found it eventually - I was too set on finding groovy documentation instead of looking at the Java API documentation.

The entry point to the model is a testRunner which is actually a WsdlTestCaseRunner object.
Its documentation can be found here: http://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/testcase/WsdlTestCaseRunner.html

From that page I can navigate to the rest of the model if I want.

RonK
  • 9,472
  • 8
  • 51
  • 87
0

SmartBear released Ready API which is further enhancement to SoapUI Pro (both are paid tools) which has context sense help while doing groovy scripting.

And the following link might be helpful to scripting.

Also would like to add a point that in groovy script test step, the following instance variables are available as you would see the same on the groovy script panel, top of the editor.

  1. context
  2. log
  3. testRunner

And the small tip is that if you type log.info in the script, you can see some interesting stuff in the log.

For example you can try

log.info testRunner
Rao
  • 20,781
  • 11
  • 57
  • 77