Forum Discussion
PaulDonny
12 years agoRegular Contributor
So this seems to be an interesting one for me personally.
There is many issues here, running TestSteps from multiple different TestCases will be difficult and SoapUI is not exactly designed to handle this. For best results, the Test Steps should be in the same TestCase in order for SoapUI to give you 'proper' results (IE, being able to see what actually happened), this can of course be bypassed by scripting a logger function and if inclined, a GUI.
As for running these concurrently, this is going to be much more difficult than you might imagine. I will give you a basic script to get you started though.
I had some issues with this, mainly things like being able to view the results.
There is many issues here, running TestSteps from multiple different TestCases will be difficult and SoapUI is not exactly designed to handle this. For best results, the Test Steps should be in the same TestCase in order for SoapUI to give you 'proper' results (IE, being able to see what actually happened), this can of course be bypassed by scripting a logger function and if inclined, a GUI.
As for running these concurrently, this is going to be much more difficult than you might imagine. I will give you a basic script to get you started though.
def testSuite = testRunner.testCase.testSuite;
//Get all test cases in the testSuite
for (TestCases in testSuite.getTestCaseList()) {
//Get all Soap type test steps within the testCases
for ( testStep in TestCases.getTestStepsOfType(com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.class)){
//Print out the name for the testStep
log.info testStep.getName();
//If it's not disabled, run it
if (!testStep.isDisabled()) {
//Set the TestRunner to the respective TestCase
TestRunner = new com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner(TestCases, null);
//Start multithreading since you want them all ran at once
def th = Thread.start {
Run them all and then rejoin the threads
TestRunner.runTestStepByName(testStep.getName());
th.join();
}
}
}
}
I had some issues with this, mainly things like being able to view the results.