Ask a Question

Can we run a Keywords test with Data-Driven Loop added through TestComplete, using TestExecute?

lakshmi_veerapp
New Contributor

Can we run a Keywords test with Data-Driven Loop added through TestComplete, using TestExecute?

We have created a Keyword test with Data driven loop added to it in TestComplete. Just wanted to know if this can test be executed with TestExecute. Also, is it possible to map new spreadsheet to this data driven loop using TestExecute 

4 REPLIES 4
baxatob
Community Hero

Re: Can we run a Keywords test with Data-Driven Loop added through TestComplete, using TestExecute?

The only purpose of TestExecute is to launch your tests created in TestComplete. According to this you can run a keyword tests using TestExecute, however to edit them you still need to use TestComplete.

Colin_McCrae
Community Hero

Re: Can we run a Keywords test with Data-Driven Loop added through TestComplete, using TestExecute?

1. Can you run it with TE. Yes. TE is just TC without the editing ability.

 

2. Can you map a new spreadsheet to it? Yes. If you set the test up correctly in the first place. And it depends whether you want it to be selective (only run this one, ignore the other two) or inclusive (run them all). If you want selective, you'll need to set something up which allows it to work that way. A control list, indicator flag at the start of a sheet, whatever. There are numerous ways you can do it. If you want inclusive, much easier. Just give it a folder. Read all the files in the folder. Work through all the Excel ones. (Which is pretty much what my framework does)

 

This is all using scripting though. No idea how you go about it with Keyword or DDT. I've never used either!

tristaanogre
Community Hero

Re: Can we run a Keywords test with Data-Driven Loop added through TestComplete, using TestExecute?


@lakshmi_veerapp wrote:

We have created a Keyword test with Data driven loop added to it in TestComplete. Just wanted to know if this can test be executed with TestExecute. Also, is it possible to map new spreadsheet to this data driven loop using TestExecute 


As has already been mentioned, the answer to your first question is "Yes"... The answer to your second question is more on the lines of "it depends".  Any code, tests, etc., that you create in TestComplete can then be executed in TestExecute. So, if you create your testing code/keyword test in TestComplete with sufficient conditionals, etc., you can dynamically change the source of the data driven loop.

The way we used to do things "back in the day" was that we would have (as @Colin_McCrae mentioned) different folders for different sets of tests. We would also have a "current" folder that, whatever set of tests we wanted to run, we'd copy into that folder.  For a test run, we had a simple batch file that would copy the desired test set from it's storage folder into the "current" folder and then run TestExecute via command line for our project. So, the spreadsheet you have on your DDT loop on your keyword test is pointing to a specific file in a specific folder... You can't necessarily "map" a new spreadsheet dynamically in TestExecute but what you CAN do is copy a different Excel sheet with the same name into that folder to get a different test run.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
m_essaid
Valued Contributor

Re: Can we run a Keywords test with Data-Driven Loop added through TestComplete, using TestExecute?

hi,

 

with keywords tests it's a little bit limited...

 

with script, just pass your spreadsheet in parameter while running test execute and use this string to run your loop...

cancel
Showing results for 
Search instead for 
Did you mean: