Forum Discussion
2 Replies
- girardtimNew Contributorbump
- M_McDonaldSuper ContributorIf you are using the Pro version, see section 2 'Groovy Script Library' on http://www.soapui.org/Scripting-Properties/scripting-and-the-script-library.html
If not you can try the following technique. Put the following code in your Project Load script:class MyClass {
def myMethod() {
// do stuff
}
}
project.metaClass.MyClass = new MyClass()
Then in your Mock Service scripts you can call the method like this:mockRunner.mockService.project.MyClass.myMethod()