Forum Discussion
5 Replies
- tristaanogreEsteemed Contributor
Short answer... no... there is no native "run Excel Script" feature in TestComplete. You still need to create at least a minimal loop, either as a keyword test or using the appropriate DDT object in your script code... and, for that matter, you will need to write some sort of parser code so that, when it reads a keyword from the Excel sheet, it knows what corresponding test to execute in the TestComplete project.
There are QUITE a number of ways of implementing this type of thing... bunch of folks have a bunch of different ways... I have one that I recently demonstrated that uses CSV's but it is written in JavaScript because of the way it implements objects. My guess (based upon your other thread) is that this is something you implemented in UFT in the past and so are more familiar with VBScript so my framework structure MIGHT not work for you... but I'm certain there are other folks here who can help you sort that out.
- rhsou123Contributor
Thank you for clarifiying things,
I hope I can find others who can help me, in fact, I have a script Read_Excel that reads from Excel, precises the tests to run and reports the results, (VBScript code), I just need to know how to use it ? is it just adding this script to the Script part in my project ?
And I wrote keywords in a .svb file, these keywords are used in the keyword column in the Excel script. How can I link between my Read_Excel script and these keywords ( stored in functions.svb) ?
- tristaanogreEsteemed Contributor
rhsou123 wrote:
Thank you for clarifiying things,
I hope I can find others who can help me, in fact, I have a script Read_Excel that reads from Excel, precises the tests to run and reports the results, (VBScript code), I just need to know how to use it ? is it just adding this script to the Script part in my project ?
Yes... with qualifications, of course. If you add that script to TestComplete, assuming it isn't using any native objects of UFT, it should be able to read the excel file and parse out the tests... again, assuming that a) the tests are also added to TestComplete in some way and b) that they don't need additional modification. It would be cool, actually, to see what your Read_Excel script looks like... someone here might be able to help you modify it into something usable in TestComplete
And I wrote keywords in a .svb file, these keywords are used in the keyword column in the Excel script. How can I link between my Read_Excel script and these keywords ( stored in functions.svb) ?
You will need to add the functions.svb file to TestComplete as well... make sure that you then use the appropriate "USEUNIT" reference in your Read_Excel.svb file to add reference to your functions unit.