StevenC
12 years agoContributor
Setting up reusable libraries is not working
I went down to copying the demo you have here ...
and it is still not working.
I have my script path set to ...
I can see that SOAP UI Pro is picking up the scripts in the log...
As the demo states the contents of Callee.groovy is ...
Again as with the Demo I have a groovy test step setup with the following code...
When I run it I get the following error...
As near as I can tell from the Demo this is set up correctly so what am I doing wrong?
This is happening with SoapUI Pro 4.6.2
http://www.soapui.org/Scripting-Properties/scripting-and-the-script-library.html
and it is still not working.
I have my script path set to ...
C:\clu-QAAutomation\scripts
I can see that SOAP UI Pro is picking up the scripts in the log...
Fri Apr 11 14:19:37 EDT 2014:INFO:C:\clu-QAAutomation\scripts\soapui\demo\Callee.groovy is new or has changed, reloading...
Fri Apr 11 14:19:37 EDT 2014:INFO:Resetting groovy class cache due to 1 modified file
Fri Apr 11 14:19:37 EDT 2014:INFO:C:\clu-QAAutomation\scripts\soapui\demo\Callee.groovy is new or has changed, reloading...
Fri Apr 11 14:19:37 EDT 2014:INFO:Resetting groovy class cache due to 1 modified file
As the demo states the contents of Callee.groovy is ...
package soapui.demo
//Callee.groovy why doesn't this work?
class Callee {
String hello() {
return "hello, world"
}
def static salute( who, log ) { log.info "Hello again $who!" }
}
Again as with the Demo I have a groovy test step setup with the following code...
c = new Callee()
log.info c.hello("Mike")
When I run it I get the following error...
Fri Apr 11 14:19:42 EDT 2014:ERROR:An error occurred [No match found], see error log for details
Fri Apr 11 14:19:42 EDT 2014:ERROR:An error occurred [startup failed:
Script3.groovy: 1: unable to resolve class Callee
@ line 1, column 5.
c = new Callee()
^
org.codehaus.groovy.syntax.SyntaxException: unable to resolve class Callee
@ line 1, column 5.
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError(ClassCodeVisitorSupport.java:146)
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:222)
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:232)
at org.codehaus.groovy.control.ResolveVisitor.transformConstructorCallExpression(ResolveVisitor.java:969)
at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:646)
at org.codehaus.groovy.control.ResolveVisitor.transformBinaryExpression(ResolveVisitor.java:937)
at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:640)
at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:139)
at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:163)
at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1240)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:50)
at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:166)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1055)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1183)
at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:141)
at org.codehaus.groovy.control.CompilationUnit$10.call(CompilationUnit.java:632)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:912)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:574)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:523)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:279)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:258)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:613)
at groovy.lang.GroovyShell.parse(GroovyShell.java:625)
at groovy.lang.GroovyShell.parse(GroovyShell.java:652)
at groovy.lang.GroovyShell.parse(GroovyShell.java:643)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.compile(SoapUIGroovyScriptEngine.java:148)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:93)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:89)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:149)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
1 error
], see error log for details
As near as I can tell from the Demo this is set up correctly so what am I doing wrong?
This is happening with SoapUI Pro 4.6.2