Testing Exchange Rates / FOREX in an accounting app
In black box automation testing of an accounting app which uses live feeds of foreign exchange rates for transactions, I would like to be able to record those exchange rates used to be able to assert calculations are correct. Are there any best practices or techniques applicable to this scenario which can help with ensuring data integrity in testing?
If I understand correctly, the only thing that makes this scenario a challenge is the use of the "live feed". Thus, stub out the live feed. Replace it with your own "non-live feed" and you end up with predictable states where your expected calculation results are truly predictable. Your "non-live feed" can be generated by hand, or if you are automating your testing, it could be generated by the same script which verifies your calculations.