Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I built a local CLI to regression-test Stripe webhooks with real event fixtures

说明与用途

Spoke Hooks CLI 记录真实 Stripe Webhook 事件为固定值,并与当前处理器行为比较,实现 CI 中的回归测试。

问题

Preserving real production-shaped webhook events as regression fixtures instead of relying only on generated or happy-path test payloads.

结果

The CLI records real Stripe webhook events as fixtures, records current handler behavior as a baseline, and compares post-change behavior, failing tests on status or body mismatches, enabling CI integration.

工作流

  • Install the CLI: npm install -D @spoke-labs/hooks
  • Initialize: npx spoke-hooks init
  • Add a Stripe event payload: npx spoke-hooks add stripe-event.json
  • Record baseline: npx spoke-hooks baseline
  • After code changes, replay event: npx spoke-hooks test

证据

The CLI exits with a non-zero status, so the same test can be used in CI.

来源

  • 记录日期: 2026-09-15T11:00:39.998Z