tdrury
15 years agoContributor
groovy in mixed pro and non-pro environment
We have 5(ish) pro licenses but also some non-Pro users. I'm trying to write a groovy script which can be usable in both. It would seem easy to simply use the non-Pro classes, but I can't seem to do that in my Pro version.
e.g. I have a groovy script that calls a teststep in another project. To create the project object I use:
This is in soapUI Pro 3.6.1. If I change WsdlProjectPro (above) to WsdlProject, I get the following error in the error log when the testcase.run() method is executed:
If I use soapUI 3.6.1 (non-Pro), I cannot use WsdlProjectPro or else I get a compile error - this is easily understood. When I use just WsdlProject, I get an error later in the script:
which I don't understand: how is the non-Pro version using ProPlaceholderStepFactory?
I need guidance for writing groovy scripts in a mixed environment so both Pro and non-Pro users can run these groovy scripts.
-tim
e.g. I have a groovy script that calls a teststep in another project. To create the project object I use:
def testlibProject = new com.eviware.soapui.impl.wsdl.WsdlProjectPro(testLibraryFilename, workspace)
This is in soapUI Pro 3.6.1. If I change WsdlProjectPro (above) to WsdlProject, I get the following error in the error log when the testcase.run() method is executed:
ERROR:java.lang.ClassCastException: com.eviware.soapui.impl.wsdl.WsdlProject cannot be cast to com.eviware.soapui.impl.wsdl.WsdlProjectPro
If I use soapUI 3.6.1 (non-Pro), I cannot use WsdlProjectPro or else I get a compile error - this is easily understood. When I use just WsdlProject, I get an error later in the script:
groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.teststeps.registry.ProPlaceholderStepFactory$WsdlProPlaceholderTestStep.getDataSource() is applicable for argument types: () values: []
which I don't understand: how is the non-Pro version using ProPlaceholderStepFactory?
I need guidance for writing groovy scripts in a mixed environment so both Pro and non-Pro users can run these groovy scripts.
-tim