John_Overbaugh
18 years agoOccasional Contributor
Coding shared soapUI groovy scripts in Eclipse
Hopefully the last low-level question... I'm moving most of my Groovy scripts into a shared Groovy script. In the process, I decided to add another layer of complexity, and code these scripts in Eclipse. So I've installed Eclipse, added the Groovy plug in, and created a new Java project with Groovy scripts.
I was able to muddle through referencing the groovy.sql.Sql. I've also seen that, in order to log, I need to pass a reference to the log:
soapUI.lds.org.qa.tools.PersonInfoSharedScripts.CleanUpPerson('AccountID0002', log)
My script is erroring, though, when I try to call it with (text, log). The error is :
java.lang.VerifyError: (class: soapUI/lds/org/qa/tools/PersonInfoSharedScripts, method: CleanUpPerson signature: (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;) Incompatible type for getting or setting field
I've attached the .groovy file I'm using. What am I doing wrong, that I cannot reference it?
One general question: is there any easy way to debug shared scripts? I'm guessing which line is erroring, and why... I'm debugging blind. It'd be great to be able to debug and step through the code, or at least see what's happening and where the error is occuring.
Thinking forward, are there any other libraries/jars I should reference proactively (for things like accessing XML results, throwing exceptions on error, etc.)?
JTO
I was able to muddle through referencing the groovy.sql.Sql. I've also seen that, in order to log, I need to pass a reference to the log:
soapUI.lds.org.qa.tools.PersonInfoSharedScripts.CleanUpPerson('AccountID0002', log)
My script is erroring, though, when I try to call it with (text, log). The error is :
java.lang.VerifyError: (class: soapUI/lds/org/qa/tools/PersonInfoSharedScripts, method: CleanUpPerson signature: (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;) Incompatible type for getting or setting field
I've attached the .groovy file I'm using. What am I doing wrong, that I cannot reference it?
One general question: is there any easy way to debug shared scripts? I'm guessing which line is erroring, and why... I'm debugging blind. It'd be great to be able to debug and step through the code, or at least see what's happening and where the error is occuring.
Thinking forward, are there any other libraries/jars I should reference proactively (for things like accessing XML results, throwing exceptions on error, etc.)?
JTO