title: Data Source loop creation using groovy script
body: <p>I am trying to create a regression test suite for my project in SOAP UI 4.5(no a pro version). I have created groovy script to read request data from excel sheet. The problem which i am facing is that i am not able run test cases in loop. The test case which comes after execution of groovy script is taking the last value only. I want the testcases to run for each iteration(the functionality in SOAP UI pro is implemented using datasource loop). Please suggest some solution. I am new to groovy scripting. Here is the groovy script which i have created up till now :</p>
  
  <pre><code>import org.apache.poi.hssf.*;
  import org.apache.poi.hssf.usermodel.HSSFWorkbook;
  import org.apache.poi.hssf.usermodel.HSSFSheet;
  import org.apache.poi.poifs.filesystem.POIFSFileSystem;
  import org.apache.poi.hssf.usermodel.HSSFRow;
  import org.apache.poi.hssf.usermodel.HSSFCell;
  
  InputStream inp = new FileInputStream("workbook.xls");
  POIFSFileSystem fs = new POIFSFileSystem(inp);
  HSSFWorkbook wb = new HSSFWorkbook(fs);
  HSSFSheet sheet = wb.getSheetAt(0);
  for (HSSFRow row : sheet) {
  
      def rownum = row.getRowNum();
      log.info rownum;
      def value1 = row.getCell(0).getStringCellValue();
      def value2 = row.getCell(1).getStringCellValue();
      log.info value1;
      log.info value2;
      context.setProperty("companyid",value1)
  companyid = context.expand('${companyid}')
  context.setProperty("operation",value2)
  operation = context.expand('${operation}')
      }
  </code></pre>