Forum Discussion
StevenC
11 years agoContributor
Nope, being relatively new to soapui I assumed based on the text of your help page that importing those objects was implicitly handled. You really should update your help page to make it clear that the classes need to be imported.
Specifically this page
http://www.soapui.org/Scripting-Propert ... brary.html
The text here...
The bolded section combined with not including the import statement in the code block implies that the import is handled internally
Specifically this page
http://www.soapui.org/Scripting-Propert ... brary.html
The text here...
Now let's setup SoapUI Pro to load up your Groovy library. Set File > Preferences > SoapUI Pro tab > Script Library. So I would set that to "C:\GroovyLib" in my example. Then restart SoapUI Pro to pick up the library script.
Now if we create a Groovy Script Step in a TestCase, we can use the above class with the following:
1.
//Caller.groovy
2.
c = new Callee()
3.
log.info c.hello("Mike")
Running this from within the Groovy Editor will show the following in the Groovy Editors log:
Tue Dec 31 10:49:05 EST 2013:INFO:hello, Mike
We can also call the static salute method:
The bolded section combined with not including the import statement in the code block implies that the import is handled internally
Related Content
- 3 years ago
- 6 years ago
- 9 years ago