Forum Discussion

kamahade's avatar
kamahade
Regular Contributor
16 years ago

Groovy script outside SOAPUI project

Hello all,

I want to run a groovy script outside soapui and in that script I want to create a project, add testsuite,add testcases.

For running a groovy within SOAPUI tool, I could run either as
script assertion
script step

both these should be within a testcase. Also, I could add a script function and place it in particular folder and refer it.
However, if I want to run a groovy outside SOAPUI project, how do I do it ?

Which jar files, I should place in path to do it from Groovy console??

11 Replies

  • marcpa's avatar
    marcpa
    Occasional Contributor
    1) Start GroovyConsole (checked with groovy 1.7.10)
    2) In "Script" menu, select "Add Jar to ClassPath"
    3) Navigate to the soapui-3.5.1.jar (which should be under the bin directory of your soapui installation) and add it
    4) Enter "import com.eviware.soapui.impl.wsdl.WsdlProject;" in the script part of your groovy console

    Then executing that groovy script (i.e. only the import line) should complete without error.

    From there, you should be able to use other soapui API classes.

    As you see things that are not found by the groovy console, find their jars and add it to your groovy console classpath.