Table Checkpint in a Data-Driven Loop
I would like to convert one of my KeywordTests into a data driven loop. I added a loop using an Excel worksheed as Source which works fine.
Inside the loop I need to create a Checkpoint to review the data inside a TDBGrid (Delphi Grid Control). The Checkpoint currently points to a Table. Is it possible to load the content of the table dynamic inside of the loop? What are my options to add Checks on table data inside of a Data-Driven Loop?
My first idea was to create a script to write the check-data from the excel file into the Store-Table. Is there a better way?
Solved! Go to Solution.
Table checkpoints are tricky because you are comparing contents to contents of the WHOLE table all at once. And the table that you have as a baseline is stored as an object in a collection. So, you are talking about doing a checkpoint of a table that is dynamically changing each time through the loop against "static" objects.
Now... the Table object itself DOES have Values properties that you can set dynamically through the test run. You would need to write code to read the expected values out of some file and populate the values in the table object. You're going to have to work with the properties available https://support.smartbear.com/testcomplete/docs/reference/project-objects/items/stores/table/values.... to first update your baseline with the expected values before you do the comparison.... and each time through the loop, you'll have to repeat this update.
Rather than using the built in table checkpoint, I'd work on writing a custom Script routine to basically do the comparisons directly rather than using a checkpoint.
Alternatively, you could create a baseline table corresponding to each time through the loop and then, using a code snippet, do an "eval" of the object, passing in the name as a variable. But his feels clunky to me.
[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
Thanks for the help, tristaanogre.
@dust258, did the previous reply answer your question?
SmartBear Community and Education Manager