The Burp - Last Test Step Runs Twice when running at the Test Case Level (SOAP)
I'm might be doing something wrong, but when I run my Test Cases (it's data-driven), after the last step (Step [ReadData] ran with status [OK], it runs the last Test Step again.
When I run just the Groovy code portion, it's reading the correct # of times (see attachment). Here I've added a couple of log info stmts to show this.
I don't have any Setup or Teardown scripts - just the Groovy code and the Request/Response. And yes, the spreadsheet has 6 rows of data and all the input values are different. I have a variable in the SOAP Request and use Assertions - but I just disabled the assertions and it still "burped."
Here is my Groovy code:
import jxl.* import jxl.write.* import com.eviware.soapui.support.XmlHolder def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) Workbook workbook = Workbook.getWorkbook(new File("c:\\SoapUIData\\Fahrenheit-Temps.xls")) //The writeable sheet will erase any data, so we can't use the data sheet and update it with the results WritableWorkbook copy = Workbook.createWorkbook(new File("c:\\SoapUIData\\Fahrenheit-Chart.xls"), workbook); WritableSheet sheet1 = copy.createSheet("Fahrenheit to Celsius", 0) Sheet sheet = workbook.getSheet(0) def rowCount = sheet.getRows()
//Read a Fahrentheit temp valCellContents=sheet.getCell(0,r) cellContents=valCellContents.getContents() FAHRENHEIT = cellContents.toString() testRunner.testCase.setPropertyValue("Fahrenheit",FAHRENHEIT) Label fh = new Label(0, r, FAHRENHEIT); //1st column sheet1.addCell(fh);
// Below I'm going to use the properties to perform assertions valCellContents=sheet.getCell(1,r) cellContents=valCellContents.getContents() EXPECTEDRESULT = cellContents.toString() testRunner.testCase.setPropertyValue("EXPECTEDRESULT",EXPECTEDRESULT) Label expectedResult = new Label(1, r, EXPECTEDRESULT); sheet1.addCell(expectedResult);