I got your message with your project layout and actual names.
Your have one project with one test case, and the steps are:
1. SOAP Request Test Step
2. Properties Test Step
3. Groovy Script Test Step
4. Property Transfer Test Step
What is happening is that each time your script runs this test case, it is going through all of the steps, including re-running your groovy script, when runs all of the test steps again, including re-running your groovy script, and so on.
You only really need the SOAP Request Test Step and the Groovy Script. Delete the others. Disable the SOAP Request Test Step, which means that it won't run as a normal sequence of Test Steps but it can still run when called by a script.
import org.apache.poi.ss.usermodel.*
import org.apache.poi.hssf.usermodel.*
import org.apache.poi.xssf.usermodel.*
import org.apache.poi.ss.util.*
def soapTestStep = testRunner.testCase.getTestStepByName("addingAccount")
def fs = new FileInputStream ("/Users/xxx/Documents/soapUIworkspace/xxx/logindata.xlsx")
Workbook wb = WorkbookFactory.create(fs)
def ws = wb.getSheet("Sheet1")
def r = ws.getPhysicalNumberOfRows()
for (def i=0; i<r; i++) {
def row = ws.getRow(i)
def c = row.getPhysicalNumberOfCells()
for(def j=0; j<c;j++) {
def cell = row.getCell(j)
if (j == 0) {
user = cell.getStringCellValue()
testRunner.testCase.setPropertyValue("name", user) //the value is saved in the property
} else {
pass = cell.getStringCellValue()
testRunner.testCase.setPropertyValue("value", pass) //the value is saved in the property
}
}
testRunner.runTestStep(soapTestStep)
//Thread.sleep(3000)
}
wb.close()
The last thing to do is to make sure that your properties are read from the Test Case, which is assumed by the above script. It wasn't clear from what you sent me where you reading the properties from. The new property expansions (in your SOAP Request) would just be:
${#TestCase#user}
${#TestCase#pass}