Forum Discussion

sherrington's avatar
sherrington
Occasional Contributor
11 years ago

Compare two Tables, or Export Table data?

Is there a way to compare two tables (Not DB) captured at different stages in a test? Or is there a way of exporting such tables to, say, CSV files?

  • Mia's avatar
    Mia
    Contributor
    Hey, have you tried Table Checkpoint functionality? It can be used very easily to compare data in table, but of course, it depends on the type of the table. We had  to add into our application some kind of "special" testing table to be able to read the data from Test Complete.
  • sherrington's avatar
    sherrington
    Occasional Contributor
    Hi, Miriam, Table checkpoints is not what I want:



    Table Checkpoints check a table against the contents of a control. I want to compare two tables produced from two different controls.

    e.g. in pseudo code:

     

    Table.grabTableFromControl1(table1);            -> saves contents in table1

    ..other…

    Table.grabTableFromControl2(table2);            -> saves contents in table2

     

    compareTables(table1, table2);                        -> compares table contents.

     

     

    OR more flexibly:

     

    Table.grabTableFromControl1(table1);

    Table.exportTable(table1, “C:\desktop\table1.csv);     -> exports table1 contents to a csv file.

     

    Ditto table2

     



    • Then I can supply my own comparison program to compare tabel1.csv with table2.csv