Forum Discussion

yassir's avatar
yassir
Occasional Contributor
8 months ago

Assertion error log

Hi All,

I need suggestion please on how to approach the following:

I created a script to compare 2 very large tables before and after deployment. in the beginning I was looping thru each row and column to compare values and I was able to see the exact field that has a mismatch in the assertion log but the issue is the script was taking way too long.

So I decided to to compare the whole resultSet received from both tables but and now I am facing a different issue, when there is a mismatch the assertion error log doesn't show where the exact discrepancy is but rather it shows the error mismatch between the full resultSet.

is there a way to capture few lines in the error log around the mismatched string in the resultSet from the assertion  instead of the whole thing

ERROR: Assertion failed: 

assert beforeTable == afterTable
       |           |  |
       |           |  '<ResultSet ..... </ResultSet>'
          |           false
          '<ResultSet ..... </ResultSet>'