Skip to main content
Varianz tests are not bound to one process. A single test session can override a VPoint in one service, probe a VPoint in another, and trigger the flow through a third — because all services share the same registry and the session ID travels with the request.

The pattern

  1. Override or probe the downstream services you need to control or observe.
  2. Sync, so every connected service has the stages.
  3. Trigger the flow through the entry point — an HTTP call or gRPC request carrying x-varianz-id. The ID propagates hop by hop.
  4. Assert on the response and on captured samples.
Add an override on payment/charge and a negative assertion on the probe, and the same shape tests the failure path — see Override and observe.
When triggering over HTTP from Python, use a requests.Session() with the header set on the session object. Bare requests.post(headers=...) drops custom headers when following redirects, which silently strips the session ID.

The test language doesn’t have to match the service language

The protocol between every test SDK and the registry is identical: stages go in via gRPC with the session ID; samples come back the same way regardless of which runtime executed the VPoint. Pick the test harness that fits your team: This is useful in practice: drive a Java service from pytest without standing up a Gradle test project; probe a Go service from the Python suite that already covers the flow; keep browser tests in Playwright while the backend stages live wherever they live.

Services without an SDK

Services in languages without a Varianz SDK (C#, PHP, Elixir, …) can’t host VPoints, but they don’t break the pattern:
  1. Instrument the services they call.
  2. Trigger the uninstrumented service through its normal API.
  3. Override and probe the instrumented services downstream of it.
The only requirement: the uninstrumented service must forward the x-varianz-id header to its downstream calls, or the session chain breaks at that hop. That’s usually a one-line addition to an existing header-forwarding list — see Propagate sessions.

Targeting when names collide

If two services register VPoints with the same short name, or you run the same service in several environments, scope the stage’s routing target:
Targets match VPoint names by suffix on / boundaries and must resolve to exactly one VPoint — ambiguity is an error, and adding segments (or org=/pkg= filters) disambiguates. Full rules: Naming and routing.