I am working with a system that has fairly complicated business logic. It has reasonably good unit, and integration tests.
We recently ran into a bug which we had missed. This bug only became apparent as certain business logic only applied after a number of days of a transaction being created.
- Each component worked.
- User tests passed
- The system worked fine on day 0
- On day x after creation of items a rule would kick in that caused some items to fail.
We had specific tests for the rule, however we did not catch that it would apply to the items we were creating. These were a new type of item which the rule should not apply to.
So in tests everything was fine, and looked fine on production but after some time some users had problems.
This would seem a difficult thing to catch before hand. Now I have some tests in place that age the transaction and test that the logic is applied correctly we can stop regressions. But we endeavour to find bugs before production.
Are there any approaches that are used in such situations to try to catch things like this as part of a QA process?