Skip to main content

Test framework

Golden tests help you keep Spine flow behavior from drifting. You add synthetic ingest payloads and expected results as JSON; the platform replays those inputs through the same processing model the data product uses, then checks outlet output and, where you model it, key–value API state. Use it to regression-test stream logic when you change operators, joins, or types.

Authoring details—folder layout, file names, numeric prefixes, and a worked example—are in Data product lifecycle — Prepare test data. Use that section as your checklist when you add or extend cases.

What you are testing

  • The flow in isolation, not a live cluster. Fixtures are not read from a real ingest stream; they are JSON files you own, applied in a defined order (the leading number on each filename sets the order).
  • Outlets — Expected files state what should appear on each outlet you assert on. Semantics follow the Outlets model: per-key change propagation, not an unfiltered broker-style log of every intermediate emission.
  • Key–value APIs — If your product materializes state for a unary API, you can include expectations for that state in your golden set when your layout supports it.

Local workflow (authors)

For day-to-day editing and builds, use dataspine check and dataspine compile. See Data product lifecycle — Test and the Dataspine CLI overview. Your golden tree—typically an ingests/ and expected/ next to a main.spine, or a layout your team standardizes—is what your automation replays and compares, step by step in ingest order.

CI and org validation

Many teams run a stricter check in build or release: compile the data product version’s sources, type-check, and, when the option is enabled, run the same golden suite in the pipeline. Command names and flags differ by control plane and operator tooling. Use --help on the tools your organization ships, or your SRE runbook. This site does not enumerate every environment-specific entrypoint.

What this is not

  • It does not replace end-to-end tests against a running data plane, real Kafka, network paths, or production-style auth. Use golden tests to pin the flow; add separate tests for deployment and operations.
  • It is not a load or chaos harness. It targets correctness and regression on the JSON scenarios you maintain.

See alsoData product lifecycle · Processor · Outlets · APIs · Dataspine CLI