More Software Engineering Radio episodes

Vivek Yadav on Regression Testing Microservices thumbnail

Vivek Yadav on Regression Testing Microservices

Published 26 Aug 2026

Duration: 59:06

"Explores microservices testing strategies, behavioral consistency in migrations, payment system challenges, regression testing, historical data validation, testable architecture, Spark's role, and AI-driven code changes, emphasizing data privacy and business insights."

Episode Description

Vivek Yadav, an engineering manager at the payment company Stripe, speaks with host Adi Narayan about building regression testing for microservices. D...

Overview

The podcast discusses a sophisticated testing strategy used in large-scale payment systems, focusing on ensuring accuracy and reliability when making code or configuration changes. Traditional unit and functional tests are deemed insufficient due to the high complexity and volume of transaction parameters - over 60 for a single network like Visa - leading to millions of possible scenarios. To address this, a regression testing harness is employed that runs updated code against vast amounts of historical transaction data, enabling comparison of outputs before and after changes. This approach ensures that even minor modifications, such as refactoring or rule updates, do not introduce unintended deviations.

Central to this system is a scalable architecture that separates core business logic from I/O operations, allowing the same logic to be reused in both real-time microservices and offline batch processing via Apache Spark. Cold storage (e.g., S3) holds years of anonymized transaction data, which is replayed through updated systems to assess financial impact and detect regressions. This method supports not only internal validation but also external use cases, such as advising major merchants on cost implications of rule changes. The system enables rapid, high-confidence testing, improves debugging through granular diff reports, and supports future advancements like AI-driven code changes, all while maintaining strict data privacy safeguards.

What If

  • What if you could validate every code change with production-level confidence before deployment?

    • Move: Build a reusable, side-effect-free core logic module for your critical business calculations (e.g., pricing, fees, eligibility) and wrap it so it can run both in your live service and in an offline Spark-like batch environment.
    • Why Now?: As your system grows, manual and unit testing become insufficient to catch edge-case regressions; catching financial logic bugs post-deploy is exponentially more costly than preventing them.
    • Expected Upside: Reduce production incidents by 70%+ for logic-heavy features, enable safe refactoring, and cut debugging time from hours to minutes with granular diff reports on real historical data.
  • What if you used real historical transactions to test new features instead of mocked data?

    • Move: Set up a weekly-automated job that pulls a representative snapshot (e.g., one week) of anonymized historical transaction data, runs it through proposed changes via a local or cloud-based batch processor, and generates a diff report of output differences.
    • Why Now?: Mocked or synthetic test data misses rare combinations of parameters (e.g., cross-border + level 3 data + specific card type); real-world complexity demands real-world validation at scale.
    • Expected Upside: Uncover hidden edge cases before launch, improve feature accuracy by 30 - 50%, and build investor and customer trust by demonstrating rigorous, data-backed validation.
  • What if you could quantify the financial impact of configuration or rule changes before they go live?

    • Move: Implement a pre-deploy impact analyzer that applies new business rules (e.g., fee adjustments, eligibility logic) to 6 - 12 months of historical transactions and calculates aggregate cost differences per merchant or region.
    • Why Now?: Rule changes often have unintended financial consequences - especially in interchange-plus models - where small miscalculations scale to millions; proactive analysis prevents customer disputes and margin erosion.
    • Expected Upside: Turn internal testing into a customer value tool - e.g., show enterprise clients how upcoming changes affect their costs - and reduce financial variance by >90% post-deploy.

Takeaway

  • Implement a regression testing harness using historical transaction data to validate code changes by comparing outputs before and after modifications, ensuring behavioral consistency in production.
  • Design core business logic as a standalone, side-effect-free module that can be reused in both real-time microservices and offline batch environments like Apache Spark for scalable testing.
  • Store anonymized transaction metadata (excluding PII) in cold storage (e.g., S3) with complete context snapshots (e.g., FX rates, rules at time of transaction) to enable accurate historical replay and impact analysis.
  • Automate regression testing in pull requests by triggering Spark jobs on a representative dataset (e.g., one week of data), generating comparison reports that highlight output deltas for review prior to merge.
  • Pre-load all dependencies (e.g., configuration rules, exchange rates) into the test environment instead of querying live systems, ensuring consistent, reproducible, and fast regression runs across historical data.

Recent Episodes of Software Engineering Radio

13 Aug 2026 SE Radio 733: Max Corbridge on Securing AI Agents

"Explores AI agent security risks, focusing on prompt injection vulnerabilities, non-deterministic threats, and the need for dynamic monitoring and proactive defenses against evolving AI-specific attacks."

15 Jul 2026 Garth Mollett on AI Supply Chain Security

"Explores AI supply chain security challenges, including probabilistic outputs, data poisoning, and emerging threats, while emphasizing structured measures like model signing and isolation to mitigate risks."

More Software Engineering Radio episodes