Forum Discussion
M_McDonald
14 years agoSuper Contributor
If 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:
Then in your Mock Service scripts you can call the method like this:
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()