Forum Discussion
I am not able to go to next row, methods next( testRunner,context) is not working
context.testCase.getTestStepByName("PNRDataSource").setStartRow("0")
context.testCase.getTestStepByName("PNRDataSource").repositionAtStartRow( testRunner, context)
currentRow = context.testCase.getTestStepByName("PNRDataSource").getCurrentRow()
log.info "currentRow First is --" + currentRow
def rowCount = context.testCase.getTestStepByName("PNRDataSource").rowCount
log.info "rowCount-- " + rowCount
for (def i = 0; i < rowCount ; i++) {
//castToString= Integer.toString(i)
//log.info "castToString---" + castToString
//context.testCase.getTestStepByName("PNRDataSource").setStartRow(castToString)
currentRow = context.testCase.getTestStepByName("PNRDataSource").getCurrentRow()
log.info "currentRowSecond is --" + currentRow
execute = context.testCase.getTestStepByName("PNRDataSource").getPropertyValue("Execute")
log.info "execute is --" + execute
log.info context.testCase.getTestStepByName("PNRDataSource").next(testRunner,context)
currentRow = context.testCase.getTestStepByName("PNRDataSource").getCurrentRow()
log.info "currentRowThird is --" + currentRow
}
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRow First is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:rowCount-- 6
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowSecond is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:execute is --N
Fri Jul 28 14:32:49 CDT 2017:INFO:false
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowThird is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowSecond is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:execute is --N
Fri Jul 28 14:32:49 CDT 2017:INFO:false
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowThird is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowSecond is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:execute is --N
Fri Jul 28 14:32:49 CDT 2017:INFO:false
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowThird is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowSecond is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:execute is --N
Fri Jul 28 14:32:49 CDT 2017:INFO:false
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowThird is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowSecond is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:execute is --N
Fri Jul 28 14:32:49 CDT 2017:INFO:false
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowThird is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowSecond is --0
Fri Jul 28 14:32:49 CDT 2017:INFO:execute is --N
Fri Jul 28 14:32:49 CDT 2017:INFO:false
Fri Jul 28 14:32:49 CDT 2017:INFO:currentRowThird is --0
punjprakash: You are replying to a thread that was already solved over two years ago. You may want to consider starting a new thread for your own issues next time.
That being said, the " next( testRunner,context)" method works for me, but only when actively running a test case (or test suite) as a test. It does not work if I run a stand-alone test. Maybe that'll help.
Related Content
- 8 years ago
- 6 years ago
Recent Discussions
- 5 days ago
- 10 days ago