pskitsme92
4 years agoOccasional Contributor
Adding groovy function to script file
Adding 2 function to script file under bin\script\
class myClass
{
def f1(val1, val2){ ....}
def f2(val1){ def status = true
return status
}
}
saving the file under bin\script\myscript.groovy, then adding groovy test step.
"
def s1= "s1"
def s2 = "s2"
util = new Myclass()
util.f1(s1,s2) >>... This works fine
...
while in another script
def s1= "s1"
util = new Myclass()
def returnVal = util.f2(s1) ... This call fails with error missing the signature
It is as, if the update to the script file is never loaded to Ready API, I have restarted ready api but that did NOT help.
The problem was, when I updated Ready API from 3.9.0 to 3.9.1 the project still pointed to the bin\script under 3.9.0,
So problem solved, thanks for the help ;o)