Financial Troubles?
My system under test has a finance piece, and I'm running into trouble with the way TestComplete handles non-integers. As far as I can tell, my numerical options are to use integers or floats. The problem is, integers can't easily be used to handle decimal points and floats are inherently inaccurate. So occasionally, when I try to store 351148.87, it instead gets stored as 351148.866666667.
This causes two problems. First, the initial checkpoints (verifying the expense was entered correctly) fail. Then later on, when I'm checking to make sure the expeses are all added correctly, I get a second failure because all of those small rounding errors start to add up. In my dataset of 200 expenses (totaling just over $1 million), I have a discrepancy of something like 36 cents.
So, my question is, does anyone else out there have a similar problem? How do you deal with it?