Forum Discussion

pkimmel's avatar
pkimmel
Occasional Contributor
8 years ago

How can I automate the process of creating stored tables for baseline comparisons?

I am automating regression tests that require using Table Checkpoints for 288 stored tables (initially).  I would like to use a script to create the baseline stored tables using data from an excel file.  My problem is how to create the stored table without using the Table CheckPoint Wizard.  I know about the ".check" command to update an existing stored table.  Is there a command that I can use in a script to create a stored table?

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    No, there is not.  The "Tables" objects is how you interact with Tables in script code and keyword tests.  Unfortunately, this object has no methods or properties on it to add them dynamically.

     

    This is one of the primary disadvantages to checkpoints in TC with one exception: that you need to create your baselines for comparison manually rather than dynamically in script. The exception is the "Objects"... you can add those dynamically in script using the Objects.Add method to add an onscreen object and it's properties to the Objects stores.

    Is there a reason why you need to do this via script? It seems that, if you have the data in your Excel, you already have your baseline.  Write code to iterate through the onscreen table and compare it to rows and columns in your excel spreadsheet to compare values.  No need to have them as "tables" in TestComplete... Excel, essentially, acts as your tables.

    • pkimmel's avatar
      pkimmel
      Occasional Contributor

      Robert,

      Thanks for the information.  Only the settings are stored in the excel file.  The program being tested uses each setting to generate a table that I want to use for comparison.  Since the regression test I want to create would use 288 tables, I would prefer to generate the stored table automatically rather than using the wizard 288 times during the first run of the test.

      I suppose I could store the tables as tabs in a spreadsheet but that seems like reinventing TestComplete stored tables.

      Do you see any way of using the Objects Add method to store a screen object such as a data grid in Objects stores, give it a unique identifier, and then use it for the comparisons?

      Thanks