import com.eviware.soapui.model.test
suite.Assertable
import com.eviware.soapui.impl.wsdl.teststeps.*
//////////////////////////////////////////////////
log.info "start run tastcase driver to
setup.html' target='_blank'>
setup new wap
id"
def testCaseDriver = loadTestRunner.loadTest.testCase.testSuite.getTestCaseByName("Driver")
log.info "HERE"
log.info testCaseDriver.getLabel()
def propertiesDriver = new com.eviware.soapui.support.types.S
tringToObjectMap ()
def asy
nc = fa
lse
testCaseDriver.run (propertiesDriver, a
sync)
def output = testCaseDriver.getPropertyValue("wapId")
log.info "Output: " + output
loadTestRunner.loadTest.testCase.setPropertyValue("wapId", output)
log.info "Here"
//////////////////////////////////////////////////
log.info "HERE"
def testCase = loadTestRunner.loadTest.testCase.testSuite.getTestCaseByName("TestCase")
log.info "HERE"
log.info testCase.getLabel()
def properties = new com.eviware.soapui.support.types.StringToObjectMap ()
//def async = false
//testCase.run (properties, async)
def testRunner = testCase.run( null, false )
//http://www.soapui.org/apidocs/
//def project = cont
ext.testCase.testSuite.project
//def testSuite = project.getTestSuiteAt(1)//project testsuite 0-->WAPLOAD 1-->TempTest
//def testCase = loadTestRunner.loadTest.testCase.testSuite.getTestCaseByName("TestCase")
//def testCase = testSuite.getTestCaseByName("TestCase")
def props = new java.util.Properties();
props = testRunner.testCase.getTestStepByName("udp");
def random=(int)(Math.random()*10)
log.info("random udp "+random)
def randomUDP = props.getPropertyValue(random.toString() );//"2");
log.info(randomUDP)
// set property value
testCase.setPropertyValue( "randomUDP", randomUDP )
testCase.setPropertyValue( "UDP ID", random.toString() )
//object.properties["name"].value = "value"
// get property value
//log.info testCase.getPropertValue("randomUDP")
//log.info object.properties["name"].value
//log.info object.properties."name".value
//for( testCaseT in testSuite.getTestCaseList() ) {
log.info("test Case : ["+ testCase.getLabel()+"]")
for( testStep in testCase.getTestStepList() ) {
//if( testStep instanceof WsdlTestRequestStep ) {
log.info (testCase.getLabel()+"------->"+"testStep"+testStep.getLabel() )
/* testStep.getTestRequest()
.setUsername(testSuite
.getPropertyValue("basicAuthUser"))
testStep.getTestRequest()
.setPassword(testSuite
.getPropertyValue("basicAuthPass"))*/
// }
}
//}
log.info "start..."
//log.info "${udpJson.1}"
def outputFinal = testCase.getPropertyValue("wapId")
log.info "Output: " + outputFinal
//loadTestRunner.loadTest.testCase.setPropertyValue("wapId", output)
log.info "done"