Hi,
Most of my tests are data driven from excel files. I'm using the following standard template.(javascript).
I think the only time I've seen similar behavior is when I've got extra rows in the data sheet and I can typically check
for this by doing a ctrl 'down arrow' to check the last row that excel thinks is defined.
Regards, Curt Hicks
.
var Driver = DDT.ExcelDriver(excelData, " < sheet name> ", true);
var rowNbr = 0;
var index = 0;
var reply, replyObject;
var dataFetchedWithNoError;
while (! Driver.EOF() ) {
omit = aqConvert.VarToStr(Driver.Value(omitHeader));
// skip row if there's anything other than whitespace in the omit column
if ( /\S+/.test(omit) == false) {
rowNbr++;
Log.Message ("non-omitted data row : "+rowNbr );
// read rest of expected data
<data> = aqConvert........ blah blah bla
// Fetch data for comparison
if ( dataFetchedWithNoError ) {
Log.PushLogFolder(Log.CreateFolder(" verifying row " ) );
// compare returned data with expected data
Log.PopLogFolder();
} // END IF - do verification if no error in the API call
index++;
} // END IF - row was not omitted
Driver.Next();
} // END -WHILE
DDT.CloseDriver(Driver.Name);
if ( 0 == rowNbr) {
Log.Warning("No data rows existed in the spreadsheet ");
}