Issue with Data-Driven Loop, script is not gracefully exiting on error
We have a requirement to create multiple accounts. All the test data are being passed from an excel sheet, for that a data-driven loop is used.
Each row in the Excel sheet is treated as a different test case.
Issue Detail:-
If one test case failed due to test data or any other issue, the script should mark that particular test case( row of an excel sheet) as failed and should pick the next row for execution. The problem is here that if the Playback setting is set as Continue on error, then in this case script is not exiting that case and continuing with the next steps.
If we set "Stop current item" in the playback setting, its moves to the next test case but the script is not entering any values in the next case and getting failed due to the "Operation interrupted by the user" error, and all the further test cases also got failed due to similar issues.
Please suggest a way to resolve this issue. Thanks
Sample Code for reference
code is similar to below
dataVar=DDT.ExcelDriver("c:\data\testdata.xls","Account",True)
while not dataVar.EOF():
try:
aqTestCase.Begin(dataVar.Value[1])
login()
fillDataInAccountForm(dataVar)
logoff()
aqTestCase.End()
except Exception as e:
Log.error("Error Occured"+str(e))
dataVar.next()