Architecture & Systems
Test Pyramid and Regression Suite
A stable library relies on many small unit tests, fewer integration tests, and a focused regression suite for key trades.
Mental model
Many fast focused tests support fewer broad tests and a targeted set of behavior-preserving regressions.
The test pyramid emphasises many cheap unit tests at the base, with fewer but broader integration and end-to-end tests above.
Regression suites fix a set of reference trades and market snapshots whose prices and Greeks must remain stable over time.
Explore the mechanism
Which behaviors should be checked quickly in isolation, and which require slower integrated evidence?
- Unit tests are cheap and should dominate the count.
- Integration/E2E tests buy realism, but they are slow and brittle.
- Regression tests protect key trades and market snapshots from accidental drift.
Which layer catches a boundary defect?
What to notice
When behaviour must change, regression expectations are updated deliberately as part of a controlled model or code decision.
Where it appears
- organizing pricing-library tests
- balancing unit, integration, and end-to-end coverage
- keeping pull-request feedback fast
Where the intuition breaks
What this view leaves out
- A test-count ratio is not a quality target; risk, boundaries, production architecture, and failure cost determine the useful mix.
Where this concept sits
Follow the strongest prerequisites, applications, extensions, and contrasts.
Connections for Test Pyramid and Regression Suite
CI gates automate the execution of unit, integration and regression checks before changes are accepted.
Supported byValidation Toolbox for PricersPricer-specific checks fit inside a broader layered unit, integration and regression testing strategy.
SupportsGolden Regression TestsGolden tests are one specialised layer within a wider regression and integration testing strategy.
CI gates automate the execution of unit, integration and regression checks before changes are accepted.
Explore concept →