ML-based test impact analysis selects only the tests affected by each code change, cutting regression suite run times by 60-80% and enabling payment platforms to ship safely multiple times per day.
The business challenge
Payment platforms face a painful tradeoff: ship fast or ship safe. A mid-sized European payment processor running 15 microservices had accumulated a regression suite of 14,000 tests that took 4.5 hours to execute end-to-end. Every pull request triggered the full suite. Engineers waited half a day for a green build. Hotfixes for production incidents queued behind unrelated test runs.
The result: a release cadence stuck at twice per week despite a team capable of shipping daily. Competitive pressure from faster-moving fintechs made this a board-level concern.
Why now
Several developments have made AI-driven test impact analysis (TIA) production-viable:
- Code-change graph tooling — Language-server-protocol-based dependency graphs can now be extracted cheaply from most languages (Java, Kotlin, TypeScript, Go) at build time.
- Historical test-failure correlation — With 2-3 years of CI data, ML models can learn which tests historically fail when specific files or modules change.
- Risk-aware selection — Modern TIA doesn't just skip tests; it assigns risk scores and guarantees a minimum coverage threshold, satisfying compliance requirements in regulated fintech environments.
- Regulatory tailwinds — PSD2 and PCI-DSS auditors increasingly accept risk-based testing approaches when backed by documented selection rationale and periodic full-suite runs.
The approach
A representative implementation for a payment platform with 10,000+ automated tests across integration, API, and end-to-end layers:
Static analysis layer — Parse the code-change diff for each PR. Build a dependency graph using AST analysis and import resolution. Identify directly and transitively affected modules.
Historical correlation model — Train a classifier on 12-18 months of CI history: for each (file_changed, test) pair, label whether the test failed within the same build. Features include file path similarity, module co-change frequency, test execution time, and historical flakiness rate. A random forest or logistic regression model is sufficient; interpretability matters for audit.
Hybrid selector — Combine static and ML signals:
- Tests with direct dependency on changed code: always run
- Tests with high ML-predicted failure probability (>15%): always run
- Tests with no static link and low predicted probability (<5%): skip
- Middle band: run on a probabilistic sample
Safety nets — Full suite runs nightly and on release branches. Any test that fails in nightly but was skipped during the day triggers automatic model retraining. Coverage gates ensure no PR ships with less than 85% of affected test coverage.
CI integration — The selector runs as a pre-step in the CI pipeline (typically a 30-second analysis phase), outputting a test manifest that the test runner consumes. Works with standard runners: JUnit, pytest, Jest, Go test.
Observability — Dashboard tracking selection ratio, escaped defects (tests skipped that would have failed), and model confidence distribution. Alerts fire if escaped-defect rate exceeds 1%.
Illustrative outcomes
A transformation like this typically targets:
- 60-80% reduction in average test suite execution time per PR
- Release cadence improvement from 2x/week to 2-4x/day
- Developer wait time reduced from 4+ hours to under 45 minutes
- Escaped-defect rate held below 0.5% with safety-net architecture
- 30-40% reduction in CI compute costs
These ranges reflect published benchmarks from similar test-selection systems in regulated software environments.
What good looks like
- Start with integration tests — They're the slowest and most amenable to impact analysis. Unit tests are cheap enough to always run.
- Keep a human override — Engineers can tag a PR as "full suite required" for high-risk changes (schema migrations, auth changes).
- Audit trail — Every selection decision is logged with rationale. Compliance teams can inspect why a test was skipped on any given build.
- Measure escaped defects, not just speed — The goal is faster AND safer, not faster instead of safer.
- Retrain regularly — Model drift happens as the codebase evolves. Monthly retraining on fresh CI data keeps accuracy high.
Where Skillikz fits
Skillikz specialises in quality engineering for regulated industries, bringing deep CI/CD pipeline expertise and ML model development under one roof. We build test impact analysis systems that integrate with your existing CI infrastructure and satisfy compliance requirements — from model training through production observability. If your release velocity is bottlenecked by test execution time, let's explore what intelligent test selection could recover.
What is test impact analysis?
Test impact analysis (TIA) determines which tests are affected by a given code change and runs only those, rather than executing the entire test suite. Modern TIA combines static dependency analysis with ML-based historical correlation.
Is AI test selection safe for regulated payment platforms?
Yes, when implemented with safety nets: nightly full-suite runs, coverage gates, escaped-defect monitoring, and audit trails showing selection rationale. PCI-DSS auditors accept risk-based approaches with documented controls.
How much CI data is needed to train a test impact model?
Twelve to eighteen months of CI build history with test-level pass/fail results provides sufficient signal. The model improves with more data but delivers value from 6 months onward.
Does test impact analysis work with microservices?
It works well. Each service's test suite is analysed independently, and cross-service integration tests are selected based on API contract changes detected in the diff.
What happens when the model gets it wrong?
Safety nets catch missed failures: nightly full runs identify escaped defects, automatic retraining incorporates the miss, and alerts fire if the escaped-defect rate exceeds the configured threshold (typically 0.5-1%).