Skip to main content
Varianz lets you write integration tests against real, running services with the same precision you get from mocks — without the mocks. You instrument a function once with a VPoint (variation point). From a test, you push a small CEL expression that overrides what that function returns, injects a failure, or captures its inputs and outputs — scoped to your test session only. Production traffic and other tests flow through unchanged. Unit tests are easy because you control everything around your code. VPoints bring that control to a live service graph: one expression controls any instrumented function in any service, with no redeploys and no shared-environment fights.

The two SDK surfaces

Varianz ships two kinds of SDK, and most teams use both:

Application SDK

Add VPoints to your services. Available for Python, TypeScript/JavaScript (Node.js), Go, Java, and Kotlin. A VPoint with no stages attached is a plain pass-through — safe to ship to production.

Test SDK

Drive tests against instrumented services from pytest, Vitest, Playwright, JUnit 5, or Go’s testing package. Insert stages, wait for delivery, trigger the service, and assert on captured samples.
The test language doesn’t have to match the service language. A pytest suite can override a VPoint in a Go service; a Go test can probe a Java service. All SDKs speak the same protocol to the same registry.

How it works

  1. Instrument — annotate or wrap a function as a VPoint with a name like payment/charge. The SDK derives a schema from the function’s types and registers it with the Varianz registry.
  2. Insert a stage — from a test, attach a CEL expression to that VPoint, scoped to your test session: ChargeResult { declined: true } to override, or sample("charge", invoke()) to observe.
  3. Trigger — call your service with the session ID in the x-varianz-id header. Only requests carrying that ID see your stages.
  4. Assert — check the response, or assert on samples the stage captured and streamed back to your test.
When the test session ends, its stages are removed automatically. When no stages are attached, the instrumented function runs exactly as written.

Start here

Quickstart

From zero to a working VPoint and a passing test.

Core concepts

VPoints, stages, sessions, and the registry — the four ideas everything else builds on.

Install the SDK

Package names and setup for every supported language.

CEL reference

The expression language you write stages in.