Forum Discussion
Your script files must be valid classes, not just arbitrary scripts.
I usually just create "utility" classes, and make all the methods static when I want simple stand-alone scripts. This documentation page has an example of creating a class with a static method and calling it. Also take note of the section on packages and how that affects the directory structure.
The one thing that I do which isn't in that documentation page, is to put import statements in my Groovy scripts that call the library functions, thus for the example on the above page, I would add to my calling script:
import readyapi.demo.Callee
Thankyou so much for replying. I have one more doubt if I want to load two groovy scripts ,that are in the same directory, with the same procedure mentioned above then it is not able to load that. Can anyone tell how can i achieve this one?
Related Content
Recent Discussions
- 4 days agogroovyguy