Forum Discussion
Hi,
I am executing Test case from excel and for every test case I have written separate function which will be executed based on either Yes or No in execute column. I want the result to paste in the same excel with either "Pass" or "Fail" as per the result
Your best bet in this case is to utilize DDT.ExcelDriver to drive your tests (http://support.smartbear.com/testcomplete/docs/reference/program-objects/ddt/exceldriver.html). This you can use within code and with a loop to loop through the rows in your excel sheet, check the "yes/no" column to determine if it should run something and then execute the appropriate function.
As for writing it back out to the same Excel sheet, you'll need to use the Sys.OleObject('Excel.Application') object to gain write access to your excel sheet. The problem is that the sheet is open and in use within the DDT script. What I would do, if you want to go this route, is to populate some sort of in-memory array within the DDT loop of pass and fail for the test cases that are run and then utilize that object to update your excel sheet outside of the loop.
- shankar_r7 years agoCommunity Hero
And also, Take time to look into this thread https://community.smartbear.com/t5/TestComplete-General-Discussions/Script-Extension-for-Data-driven-framework/m-p/142221
Related Content
- 2 years agoShahZaib
- 8 months agoEgg
- 4 years agotradam
- 4 years agomaxrussell