0
我正在使用下面的groovy腳本,我想從CSV傳遞值到Get是否輸入xml請求。但是,即使我能夠從CSV讀出的值,但這些值並不順利通過下面輸入XML是我的代碼:SOAP UI Groovi_Csv數據沒有在輸入xml請求中傳遞
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def csvFilePath = "C:/Users/hemant.varhekar/Desktop/Sprint/SOAPUI/New Text Document.csv"
context.fileReader = new BufferedReader(new FileReader(csvFilePath))
rowsData = context.fileReader.readLines()
int rowsize = rowsData.size()
log.info rowsize
for(int i =0; i < rowsize; i++)
{
rowdata = rowsData[i]
String[] data = rowdata.split(",")
log.info data[0]
log.info data[1]
groovyUtils.setPropertyValue("GetWeather111", "CityName1", data[0])
groovyUtils.setPropertyValue("GetWeather111", "CountryName1", data[1])
testRunner.runTestStepByName("GetWeather111")
}