Forum Discussion

michelleunique's avatar
michelleunique
New Contributor
3 years ago
Solved

Accommodating Dynamic Row Counts in TestComplete

I'm trying to bring in some formerly manual regression tests that include checking row counts in a table. Depending on the number of entries at any given time, the count could be different each time the test is run. I'm looking for advice on the best way to add a checkpoint that 1)counts the number of rows at testing time and 2) validates that the row count indicated at the bottom of the table is correct.  

 

Further, that dynamic row count value is currently used in subsequent tests. Any advice on how to go back to that value and use it in a separate test? 

 

I'm using TestComplete 15.40.421.7 x64 on a desktop. 

 

Thanks in advance! 

  • To count the rows, you would write a loop that increments a counter for each row and stops at end of file condition on the table rather than stopping on a row number.

     

    Saving that total in a variable would allow you to compare it to the expected value.

     

    You can make that variable be a project variable or a project suite variable to share the value with other tests. 

    https://support.smartbear.com/testcomplete/docs/testing-with/variables/index.html

2 Replies