Mark_E
15 years agoOccasional Contributor
Can't load groovy script from script library
Hi,
I am trying to use the script library feature of SoapUI Pro in version 2.5.1 on Windows. I just can't get it to work. When calling a static method on a class or instantiating a class, I receive a "unable to resolve class" error. When I change the groovy file, SoapUI is reporting and update, "MyTest.groovy is new or has changed, reloading...
But using anything in the file fails.
=== MyTest.groovy
package test
public class MyTest
{
static def test =
{
log.info("Hello Test")
}
}
===
// Groovy script in Groovy Test Step
test.MyTest.test()
Results in: unable to resolve class test.MyTest @ line 1
I am trying to use the script library feature of SoapUI Pro in version 2.5.1 on Windows. I just can't get it to work. When calling a static method on a class or instantiating a class, I receive a "unable to resolve class" error. When I change the groovy file, SoapUI is reporting and update, "MyTest.groovy is new or has changed, reloading...
But using anything in the file fails.
=== MyTest.groovy
package test
public class MyTest
{
static def test =
{
log.info("Hello Test")
}
}
===
// Groovy script in Groovy Test Step
test.MyTest.test()
Results in: unable to resolve class test.MyTest @ line 1