Building a tax regression test pack
A regression pack is a maintained set of transactions with known expected results, run before and after every meaningful change. This lesson covers what goes in it, how to store expected results, how to run comparisons, and how to keep it alive.
By Herb Park, Clarent Technologies
Content releases, configuration changes, ERP upgrades, add-on versions and migrations all change tax results, sometimes on purpose and sometimes not. A regression pack is how you tell the difference with evidence instead of hope. It is also the single most reusable asset a tax technology team owns.
What goes in the pack
Design for coverage of risk. A pack of 2,000 near-identical invoices proves less than 150 well-chosen scenarios. Start from these dimensions and pick combinations that matter for your business:
| Dimension | Examples of scenarios |
|---|---|
| Legal entities | Each entity that transacts, including recently acquired ones |
| Jurisdictions | Top states or countries by volume; jurisdictions with special districts; origin-based states; recent registrations |
| Products | Top products by revenue; products with special taxability (software, services, bundles, digital goods); freight and fees |
| Customers | Taxable, exempt with certificate, reseller, government, foreign |
| Document types | Invoice, credit memo with reference, return, debit memo, intercompany |
| Purchasing | Supplier charged correct tax, under-charged (use tax accrual), over-charged, exempt purchase |
| Dates | Transactions either side of a known rate change or holiday |
| Edge cases | Tax-inclusive pricing, long multi-rate invoices, zero amounts, rounding boundaries |
Recording expected results
Store each scenario as structured data, not screenshots. A spreadsheet or a small table works if it has one row per line and a stable scenario ID. At minimum record:
- Scenario ID and description, including why it exists ("CO home-rule city, destination sourcing").
- The inputs you will send: entity, document type, date, customer, product, addresses, amount.
- Expected tax by jurisdiction, not just the total, plus the expected taxability or reason where your engine returns one.
- Who approved the expected result and when. An expected result nobody signed off is a guess.
- Effective-date notes for scenarios that will legitimately change after a known date.
Running a comparison
- Baseline Run the pack on the current setup and confirm results match the expected values. Investigate any mismatch before you change anything.
- Change Apply the content update, configuration change or upgrade in the test environment.
- Re-run Run the same pack with the same dates and inputs.
- Compare Diff line by line and jurisdiction by jurisdiction. Classify every difference as expected (explained by the change) or unexpected.
- Decide Release only when every unexpected difference is explained or fixed, and update expected results that legitimately changed.
Where possible, drive the pack through the ERP rather than calling the engine directly. Engine-only tests prove the engine; ERP-driven tests also prove the integration, which is where most problems live. Many teams keep both: a fast engine-level pack for content releases and a smaller ERP-level pack for upgrades and go-lives.
Keeping it alive
- Review the pack twice a year against new products, entities, registrations and customer types.
- Retire scenarios that no longer reflect the business, so failures stay meaningful.
- Keep the pack and its expected results under version control, with a change log.
- Store each run’s results; the history of runs is useful audit evidence that changes were tested.