cancel
Showing results for 
Search instead for 
Did you mean: 

Table Checkpint in a Data-Driven Loop

SOLVED
Highlighted
New Contributor

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?

ddl.PNGMy 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?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Table Checkpint in a Data-Driven Loop

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.


Robert Martin
[Community Expert Group]
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

View solution in original post

4 REPLIES 4
Community Manager

Re: Table Checkpint in a Data-Driven Loop

Community, what do you think?

@tristaanogre@AlexKaras, @RUDOLF_BOTHMA, what can you suggest?

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Community Hero

Re: Table Checkpint in a Data-Driven Loop

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.


Robert Martin
[Community Expert Group]
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

View solution in original post

Community Manager

Re: Table Checkpint in a Data-Driven Loop

Thanks for the help, tristaanogre.

@dust258, did the previous reply answer your question?

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Contributor

Re: Table Checkpint in a Data-Driven Loop

Thank you, I will write a custom script and post the results here next week.