update on this issue.I dont see the test case running multiple times anymore.Now, i see handle is not getting returned to caller test case from callee test case.i have underlined the lines that causing issue where i try to set property in caller test case.Doesnt seem to work.Any guesses ?
CurTsLbl=testRunner.testCase.getTestSuite().getLabel().toString()
CurTcLbl=testRunner.testCase.getLabel().toString()
CurTCHandle=testRunner.testCase.testSuite.project.getTestSuiteByName(CurTsLbl).getTestCaseByName(CurTcLbl)
MtnTCHandle=testRunner.testCase.testSuite.project.getTestSuiteByName("GetMtnFromVision").getTestCaseByName("GetMtn")
//Check Mtn Criteria
strMtnCriteria=testRunner.testCase.getTestStepByName("Properties").getPropertyValue("MtnCriteria")
strDeviceType=testRunner.testCase.getTestStepByName("Properties").getPropertyValue("deviceType")
if (strMtnCriteria.length()>0)
{
strVisionEnv=testRunner.testCase.testSuite.getPropertyValue("VisionEnv")
log.info strVisionEnv
def properties = new com.eviware.soapui.support.types.StringToObjectMap()
def async = false
MtnTCHandle.getTestStepByName("Properties").setPropertyValue("MtnCriteria",strMtnCriteria)
MtnTCHandle.getTestStepByName("Properties").setPropertyValue("VisionEnv",strVisionEnv)
MtnTCHandle.run(null,async)
def returnedStr= MtnTCHandle.getTestStepByName("Properties").getPropertyValue("returnStr")
if (returnedStr.length()>0)
{
tempArray=returnedStr.split("#")//contains mdn[0],ssn[1],deviceid[3]
CurTCHandle=testRunner.testCase.testSuite.project.getTestSuiteByName(CurTsLbl).getTestCaseByName(CurTcLbl)
log.info CurTsLbl
log.info "%%%%%"
log.info CurTcLbl
CurTCHandle.getTestStepByName("Properties").setPropertyValue("mobileNumber",tempArray[0])
CurTCHandle.getTestStepByName("Properties").setPropertyValue("ssn",tempArray[1])
}
else
{
testRunner.fail("no mdn found for criteria")
testRunner.testCase.getTestStepByName("TestRunnerProperties").setPropertyValue("TestLastFailedStep","no mdn found for criteria")
}
}