Forum Discussion
- Hassan_BallanContributor
Perhaps this post would help Test runs successfully with TestComplete but fails when run with TestExecute | SmartBear Community
- MadhuLambuContributor
Am running from within the IDE that is installed in Program Files (x86). Because it's in the (x86) folder, I assumed it is 32 bit, but Task Manager clearly shows it's 64 bit.
- Hassan_BallanContributor
TestComplete and TestExecute are shipped with both 32 and 64 bit flavors and both are installed in the "Program Files (x86)" folder.
C:\Program Files (x86)\SmartBear\TestComplete 15\Bin\*.exe
C:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin\*.exe
Use Windows "Task Manager" > "More details" > Details > and look at the Image path name for the correct version you are running. Most likely the 64 bit.
To access Excel you also need proper Microsoft Office driver dependent on your Office version, as well as TesCOmplete/TestExecute bit version explained in this Using Excel Files as Data Storages | TestComplete Documentation (smartbear.com)
Also you may find that such Microsoft Office drivers are no longer available, saving your file in a lower version of Excel version (such as .xls not ,xlsx) may solve your problem.
- rraghvaniChampion Level 3
I'm not sure how you are opening the file, but see post Getting error message when trying to read CSV and XLSX file | SmartBear Community which should hopefully give you some clues.
- MadhuLambuContributor
I have a variable defined on the project of Type 'DB Table'.
Here's the code snippet am using,
let sheet = Project.Variables.params;
sheet.Reset();
while (!sheet.IsEOF()) {
id = sheet.Value("ID");
.
.
.
}
sheet.Disconnect();- rraghvaniChampion Level 3
The snippet of coding does not really provide much information, to diagnose the issue. If you can provide the full code and the spreadsheet, that would help.
- MadhuLambuContributor
Here's the XLSx file. I have replaced actual data with mock data. There are 25 rows.
params is the variable defined in the project
Here's the complete code:const sheet = Project.Variables.params;
sheet.Reset();
while (!sheet.IsEOF()) {
id = sheet.Value("ID");if (id == Project.TestItems.Current.Iteration) {
obj = JSON.parse(sheet.Value("JSON"));
break;
}sheet.Next();
}sheet.Disconnect();
Please note that this is a very intermittent issue.
- rraghvaniChampion Level 3
I'm assuming you are using the Execution Plan? I ran 100 iterations (Count is 100) and no errors were shown.
As you are opening and closing the Excel document many times, the internal object may not have been fully cleared. This could cause the issue.
I'm not sure if you are doing data driven, but calling this snippet of code, will eventually slow things down. In this example, it will iterate 7 rows, then match the 8 row based on current iteration.
- MadhuLambuContributor
I haven't seen the issue often, but it does pop now and then and it causes the long running tests to stop.
Yes, this is data driven by matching the iteration number with the ID value. You are right about the slowness of the logic. Please do share your thoughts on better ways to do data driven.
Related Content
- 3 months ago
Recent Discussions
- 4 hours ago