JMcKinley
18 years agoContributor
Problem with global groovy script
I created a global groovy class and then tried to instantiate that class in a "local groovy" script. The system gives me an error that it can't find the class ("unable to resolve class soapui.Test.TestRequest").
Here is what I did:
1. I changed the path in the SOAP UI Pro settings to be the same path that the SOAP UI project is found (and this is where the class isdefined0.
2. Here is the code in my class:
package soapui.Test
class TestRequest
{
TestRequest {
}
def getTest() {
return 123657;
}
}
Here is the instantiation in my groovy script in my SOAP UI Pro project:
import soapui.Test.TestRequest;
def Test = new TestRequest();
I also tried this without the import statement...
Help!!
Thanks!
Jim
Here is what I did:
1. I changed the path in the SOAP UI Pro settings to be the same path that the SOAP UI project is found (and this is where the class isdefined0.
2. Here is the code in my class:
package soapui.Test
class TestRequest
{
TestRequest {
}
def getTest() {
return 123657;
}
}
Here is the instantiation in my groovy script in my SOAP UI Pro project:
import soapui.Test.TestRequest;
def Test = new TestRequest();
I also tried this without the import statement...
Help!!
Thanks!
Jim