Wednesday, November 11, 2015

Set

import com.soapuitutorial.property.Xls_Reader
//import com.eviware.soapui.impl.wsdl.testcase.*
//def TestSuite = "TestSuite 1"
def prj = testRunner.testCase.testSuite.project                
          def tSuite= 'TestSuite'
def Xls_Reader xls = new Xls_Reader("C:\\Users\\kushaGra\\Desktop\\TestData.xlsx")
//log.info "Total rows " + xls.getRowCount("TCName")
//log.info xls.getCellData("TCName", "TCDescr", 2)

for(def i=2;i<=xls.getRowCount("TCName");i++){
def des= xls.getCellData("TCName", "TCDescr", i)
log.info "********loop*********"
def tCase= xls.getCellData("TCName", "TC", i)
//testRunner.testCase.setPropertyValue("aa", xls.getCellData("TCName", "TCDescr", i))
  //prj.getTestSuiteByName(TestSuite).getTestCaseByName(TestCase).setPropertyValue("aa", des)
  prj.getTestSuiteByName(tSuite).getTestCaseByName(tCase).setTearDownScript(des)
                     
}



No comments: