Forum Discussion
KarelHusa
10 years agoSuper Contributor
You can execute all test cases from your worspace by the following Groovy script:
import com.eviware.soapui.model.testsuite.*
import com.eviware.soapui.support.types.StringToObjectMap
import com.eviware.soapui.SoapUI
project = testRunner.getTestCase().getTestSuite().getProject().getWorkspace().getProjectByName("Project1")
for(project in SoapUI.workspace.projectList) {
log.info project.getName()
project.getTestSuiteList().each {
TestSuite ts = it
List<TestCase> tcs = ts.getTestCaseList()
tcs.each {
TestCase tc = it
log.info "Running " + project.getName() + " " + tc.getName()
tc.run(new StringToObjectMap(), false)
}
}
}
You can modify the script to choose the suits, test cases etc.
You can execute the script e.g. if you create a new project/test suite/test case and define a Groovy script test step. Then you launch this step to execute the script, just avoid the infinite loop.