cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with Groovy Script

Highlighted
New Contributor

Need help with Groovy Script

Hi All,

 

I am new to SOAPUI Groovy Scripting. I am not sure where to start.  There was a link to set and get properties(http://www.soapui.org/scripting---properties/tips---tricks.html#1-1-Get-and-Set-properties). It  uses implict objects like testRunner, context etc. Where can I find more info about implicit objects like methods and instance variables? I thought javadocs but  Javadoc for TestRunner( http://www.soapui.org/apidocs/com/eviware/soapui/model/testsuite/TestRunner.html) does not have variable testCase. Not sure looking at the right place. Any help appreciated.

3 REPLIES 3
Highlighted
New Contributor

Re: Need help with Groovy Script

Highlighted
Occasional Contributor

Re: Need help with Groovy Script

The best way to study groovy script is through API documentation for SoapUI. If you dont know about methods defined in TestRunner or TestCase or any such variable then on groovy test step you should write something like the following code:

log.info testRunner
log.info testRunner.testCase

 and this will give you the class name for TestRunner or TestCase. After that, open the API documentation and go to the desired class name, clicking on which you will be introduced to a whole lot of methods.

Highlighted
Community Hero

Re: Need help with Groovy Script

Hope you have found the link useful. Otherwise are you still looking for anything specific? Groovy Script, by defult context, log, testRunner vairables are available which you can see on the top of the script editor.


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors