Forum Discussion

ChuckAtIvory's avatar
ChuckAtIvory
Contributor
15 years ago

Table Checkpoint - How to ignore numeric differences past the 10th decimal place

Hi there,



A table in our application stores numbers out to as far as 20 decimal places. (Under the hood it needs to.) Sometimes there are numeric differences 10+ decimal places out. I want TestComplete8 to ignore those differences.



I tried editing an individual table checkpoint value and inserting a wildcard (0.123456789012345 became 0.1234567890* ) but * was recognized as an asterisk, not a wildcard.



How can I set up a table checkpoint so it ignores differences past the 10th decimal place?



Thanks,



Chuck
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Paul,


     


    It's still under the development. I've added your vote to the suggestion.


    In TestComplete 10, there is a way to exclude a cell or a row from the comparison. Check whether it works for you.


     


  • Hi Chuck,





    Currently, there is no way to do this. You will have to enumerate table cells and write the needed comparison logic yourself. However, I've registered your request in our DB as a suggestion. Thank you.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Chuck,



    Meanwhile as a workaround and depending on the database server you are using, you may consider creation of the helper stored procedure (SP) that will wrap your actual SQL statement and return data formatted with the precision that you need. Then you may save the initial SP output as a checkpoint and use it for the test.
  • Has there been any progress on this since 2010?

    I am also looking for a way to wildcard data in table checkpoints.
  • Kristijan_Bratu_1's avatar
    Kristijan_Bratu_1
    Occasional Contributor
    Hi,

    I am also looking for a way to wildcard data in table checkpoints.

    Like:

    14-300-12345678

    **-300-12345678

    Regards,

    Kristijan

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Kristijan,


     


    Right now, to accomplish your task, you need to create a customer comparison function that will compare each cell of the table with the desired value. 


    As for the Table Checkpoints, I've added your vote to improve the comparison algorithms.


     

    • chainmailguy's avatar
      chainmailguy
      Occasional Contributor

      Please add my vote for this feaure.

      Either  ? and * wildcards,

      or Greater Than / Less Than by absolute or percentage for numerics

      or something similar to the cmpCompare function in the If/Then statement would be sufficient.

       

      Can you give me a hint what the custom code might look like? I've found the Compare Properties function but it's kinda painful to set up a separate check step for each cell in a grid.