Your fix works in test but the bug still happens in production: configuration drift
Test environments drift from production: older rule groups, missing mappings, an extra rule that shifts numbering. Diff the configurations before you trust a test result, and promote by hand when they differ.
By Herb Park, Clarent Technologies
Symptom
A production issue will not reproduce in test, or reproduces differently. Test returns a generic ERP tax code on every line, or a fix that passed in test does something else in production.
What it usually means
The engine configuration in test is no longer a copy of production. Drift we have seen:
- Test still runs an older rule group with a different structure.
- Test has no tax code mappings (or only an empty default group), so every line maps to one generic code.
- Production has one extra rule that test lacks, so rule numbers no longer line up between the two.
- Company identifiers differ slightly, so test calls land on the wrong company.
There is also short-lived drift: right after an import or check-in, results can flip for a few minutes (company not found, a generic code, a stale rule) before they settle.
How to confirm it
- Export the company configuration from both environments and diff rule groups, rules, reference lists, mappings and company IDs.
- Re-run the failing case in test only after accounting for every difference.
- After any import, wait a few minutes and run the case twice before trusting the result.
- Item: Rule group; Test: Older structure; Production: Current structure
- Item: Tax code mappings; Test: Empty default group; Production: 46 mappings
- Item: Rules in the group; Test: 31; Production: 32
- Item: Company ID; Test: CO1000; Production: CO_1000
- Item: Reference lists; Test: 12 lists; Production: 12 lists, same entries
- (1) An older rule group in test means a fix is being tested against logic production no longer runs.
- (2) With no mappings, every line in test maps to one generic ERP tax code.
- (3) One extra rule in production shifts the numbering, so rule numbers stop lining up.
- (4) A small difference in the company ID sends test calls to the wrong company.
Fix
- Refresh test from production when drift is large, then remove obsolete rule groups.
- When the two differ, promote changes to production by hand under change control instead of importing a test export, then export production and diff it against test to confirm only the intended change moved.
- Diff shows a difference
- Is the drift large?
- Refresh test from production: Then remove obsolete rule groups
- Change production by hand: Under change control, no import of a test export
- Export production again: Diff it against test
- Only the intended change moved
How to prevent it
- Diff test against production monthly and before every change window.
- Refer to rules by name, not number, in tickets and change records.
- Run the same regression pack in both environments.