Forum Discussion

rushikesh's avatar
rushikesh
Contributor
9 years ago

How to compare data present in grid form.

How to compare data present in grid format?

 

There is date present in rows and columns in grid form.

My requirement is to compare this data every time while testing.

 

I tried something like this - copy  data from grid and paste in notepad and then compare with baseline txt file.

Problem in this method is that some columns are getting interchanged when i paste in notepad.

 

is there a way to compare this ?

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    You can probably use an Object checkpoint or even a Table checkpoint.  The latter is specifically designed to compare data in a tabular view against a known set of values.  See if that works for you.

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      Or do it column by column using arrays.

       

      Even read it in value by value. And then read in your expected results from some other data source.

       

      But I'd ditch using text files and comparing them right now. That sounds like a horrible way to do. Way too much scope for minor formatting issues to throw the whole thing out.

       

      Plus, if a value within the table doesn't match, you want to be able to pinpoint and highlight it. If your failure report simply says "the text files don't match" then someone has to go digging through the two files looking for the difference that caused the failure. I wouldn't want to be that person! Automated tests are meant to make life easier, this way of doing sounds like it would actually create more work!