deggial
13 years agoOccasional Contributor
Groovy script execution hangs in the middle of a test file
After successfully sending several thousands parametrized requests groovy script hangs and stop execution (CPU is 90% idle and more than 1 Gb Ram is free)
Need to restart SoapUI (4.5.1 Open Source) to be able to run anything again. Can you please advise if it's SoapUI bug or something wrong with the script?
Groovy test script:
References:
http://www.loadui.org/forum/viewtopic.php?f=5&t=15500#p37045
http://balur-sangamesh.blogspot.com/2012/05/groovy-read-write-values-from-csv-file.html
http://thewonggei.wordpress.com/2010/08/05/configure-http-basic-auth-once-for-soapui-test-suties/
Need to restart SoapUI (4.5.1 Open Source) to be able to run anything again. Can you please advise if it's SoapUI bug or something wrong with the script?
Groovy test script:
import com.eviware.soapui.impl.wsdl.teststeps.*
def testDataSet = []
def fileName = "C:\\Users\\xxx\\Desktop\\testdata.csv"
new File(fileName).eachLine { line -> testDataSet.add( line.split(",") ) }
for ( i in testDataSet ) {
def myProps = new java.util.Properties();
myProps = testRunner.testCase.getTestStepByName("Properties");
myProps.setPropertyValue("parameter1",i[0]);
myProps.setPropertyValue("parameter2",i[1]);
myProps.setPropertyValue("parameter3",i[2]);
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
def testCase = testRunner.testCase;
def testStep = testCase.getTestStepByName("myWSRequest");
testStep.getTestRequest().setUsername(myProps.getPropertyValue("username"))
testStep.getTestRequest().setPassword(myProps.getPropertyValue("password"))
testRunner = new com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner(testCase, null);
testStepContext = new com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext(testStep);
testStep.run(testRunner, testStepContext);
}
References:
http://www.loadui.org/forum/viewtopic.php?f=5&t=15500#p37045
http://balur-sangamesh.blogspot.com/2012/05/groovy-read-write-values-from-csv-file.html
http://thewonggei.wordpress.com/2010/08/05/configure-http-basic-auth-once-for-soapui-test-suties/