> ## Documentation Index
> Fetch the complete documentation index at: https://docs.varianz.io/llms.txt
> Use this file to discover all available pages before exploring further.

# What is Varianz?

> Varianz makes integration testing as simple as unit testing: instrument functions once with VPoints, then control and observe them from your tests — against real running services.

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:

<Columns cols={2}>
  <Card title="Application SDK" icon="plug" href="/guides/instrument-a-service">
    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.
  </Card>

  <Card title="Test SDK" icon="flask" href="/testing/overview">
    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.
  </Card>
</Columns>

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

<Columns cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    From zero to a working VPoint and a passing test.
  </Card>

  <Card title="Core concepts" icon="lightbulb" href="/concepts/vpoints">
    VPoints, stages, sessions, and the registry — the four ideas everything else builds on.
  </Card>

  <Card title="Install the SDK" icon="download" href="/installation">
    Package names and setup for every supported language.
  </Card>

  <Card title="CEL reference" icon="code" href="/reference/cel">
    The expression language you write stages in.
  </Card>
</Columns>
