eelzinga
15 years agoOccasional Contributor
SoapUI testcase called from within LoadUI generates errors
I have the next situtatie :
SoapUI :
mytestcase
- soap - insertEmployee webservice
- soap - readEmployee webservice
the next step in the flow should be : remove the employee
i tested this by the following two solutions :
- jdbc step - delete from employees where id = (the id created by the insertEmployee webservice)
- groovy script and use something like :
Both work perfect when i test it from soapui itself.
When i just run the testcase 1 time, it's ok, and also when i put the teststeps in a loadtest in soapui itself and run it for 10min with 5 threads it works ok.
Now the next step in the process.
I use the testcase to generate my loadui project. In loadui it generates the soapui runner/fixed rate and statistics component for me and everything looks ok.
Now i use the next command to do the loadui run :
loadUI-cmd.bat -Dsoapui.properties=soapui_tst.properties -F PDF -L 10:0:0 -l -nofx -p d:/employee-loadui-test.xml -r d:/temp1
This works ok and it triggers the soapui testcase, but at random moments it generates the next errors :
I think something gets messed up with the sql connections. But the weird this is, when i loadtest it from soapui it works great, but when i test it with the command mentioned (loadUI-cmd.bat), and run it for like 10 sections it already fails with errors.
When i remove the delete-step in the soapui-testcase and use the loadUI-cmd.bat command again, it works perfect. So it must has something to do with the sql connections.
Any idea how to fix this ?
SoapUI :
mytestcase
- soap - insertEmployee webservice
- soap - readEmployee webservice
the next step in the flow should be : remove the employee
i tested this by the following two solutions :
- jdbc step - delete from employees where id = (the id created by the insertEmployee webservice)
- groovy script and use something like :
connectionString = "jdbc:oracle:thin:user/pwd@my_db_host"
def driverClassName = "oracle.jdbc.driver.OracleDriver";
def id = ...retrieve id from the insertEmployee request ....
// delete employee
try {
def sql = Sql.newInstance(connectionString, driverClassName);
sql.execute("delete from employee_table where id= ?", [id] );
log.info("Record with id " + id + " is deleted")
}
finally {
if (sql != null) {
sql.close();
}
}
Both work perfect when i test it from soapui itself.
When i just run the testcase 1 time, it's ok, and also when i put the teststeps in a loadtest in soapui itself and run it for 10min with 5 threads it works ok.
Now the next step in the process.
I use the testcase to generate my loadui project. In loadui it generates the soapui runner/fixed rate and statistics component for me and everything looks ok.
Now i use the next command to do the loadui run :
loadUI-cmd.bat -Dsoapui.properties=soapui_tst.properties -F PDF -L 10:0:0 -l -nofx -p d:/employee-loadui-test.xml -r d:/temp1
This works ok and it triggers the soapui testcase, but at random moments it generates the next errors :
groovy.lang.MissingPropertyException: No such property: sql for class: Script1
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:49)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:239)
at Script1.run(Script1.groovy:36)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:88)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runTestStep(WsdlTestCaseRunner.java:207)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:138)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:39)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:812)
at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:679)
at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:406)
at com.eviware.loadui.impl.component.categories.RunnerBase.access$600(RunnerBase.java:65)
at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:686)
at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:188)
at java.lang.Thread.run(Unknown Source)
--------------------------------------------
java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(Unknown Source)
at java.util.zip.ZipFile.getEntry(Unknown Source)
at java.util.jar.JarFile.getEntry(Unknown Source)
at org.apache.felix.framework.util.JarFileX.getEntry(JarFileX.java:61)
at org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:120)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1733)
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716)
at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1685)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.codehaus.groovy.control.CompilationFailedException.<init>(CompilationFailedException.java:42)
at org.codehaus.groovy.control.MultipleCompilationErrorsException.<init>(MultipleCompilationErrorsException.java:30)
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
at org.codehaus.groovy.control.ProcessingUnit.completePhase(ProcessingUnit.java:138)
at org.codehaus.groovy.control.ProcessingUnit.gotoPhase(ProcessingUnit.java:157)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:459)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:306)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:287)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:727)
at groovy.lang.GroovyShell.parse(GroovyShell.java:739)
at groovy.lang.GroovyShell.parse(GroovyShell.java:766)
at groovy.lang.GroovyShell.parse(GroovyShell.java:757)
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:88)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.runSetupScript(WsdlTestCase.java:863)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:96)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:39)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:812)
at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:679)
at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:406)
at com.eviware.loadui.impl.component.categories.RunnerBase.access$600(RunnerBase.java:65)
at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:686)
at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:188)
at java.lang.Thread.run(Unknown Source)
------------------------------
13:36:19,488 ERROR [AbstractTestRunner] Exception during Test Execution
java.util.ConcurrentModificationException: Document changed during select
at org.apache.xmlbeans.impl.store.Path$XbeanPathEngine.next(Path.java:459)
at org.apache.xmlbeans.impl.store.Cursor._toSelection(Cursor.java:931)
at org.apache.xmlbeans.impl.store.Cursor._getSelectionCount(Cursor.java:946)
at org.apache.xmlbeans.impl.store.Cursor.notifyChange(Cursor.java:882)
at org.apache.xmlbeans.impl.store.Locale.notifyChange(Locale.java:1693)
at org.apache.xmlbeans.impl.store.Cur.moveNode(Cur.java:1908)
at org.apache.xmlbeans.impl.store.Cur.moveNode(Cur.java:1844)
at org.apache.xmlbeans.impl.store.Cur.createHelper(Cur.java:287)
at org.apache.xmlbeans.impl.store.Cur.createAttr(Cur.java:211)
at org.apache.xmlbeans.impl.store.Locale.applyNamespaces(Locale.java:2282)
at org.apache.xmlbeans.impl.store.Xobj.copy_contents_from(Xobj.java:2353)
at org.apache.xmlbeans.impl.store.Xobj.copy(Xobj.java:2405)
at org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:155)
at org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:138)
at org.apache.xmlbeans.impl.values.XmlObjectBase.copy(XmlObjectBase.java:119)
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfersTestStep$PropertyTransferResult.addTransferResult(PropertyTransfersTestStep.java:238)
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfersTestStep.run(PropertyTransfersTestStep.java:141)
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfersTestStep.run(PropertyTransfersTestStep.java:111)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runTestStep(WsdlTestCaseRunner.java:207)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:138)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:39)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:812)
at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:679)
at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:406)
at com.eviware.loadui.impl.component.categories.RunnerBase.access$600(RunnerBase.java:65)
at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:686)
at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:188)
at java.lang.Thread.run(Unknown Source)
I think something gets messed up with the sql connections. But the weird this is, when i loadtest it from soapui it works great, but when i test it with the command mentioned (loadUI-cmd.bat), and run it for like 10 sections it already fails with errors.
When i remove the delete-step in the soapui-testcase and use the loadUI-cmd.bat command again, it works perfect. So it must has something to do with the sql connections.
Any idea how to fix this ?