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

# Tusk Drift Overview

> Automate API testing using live traffic with Tusk Drift

Tusk Drift is an API test automation tool that helps developers detect and fix regressions.
We record/replay live traffic to provide a full API test suite with zero engineering effort.

Unlike traditional mocking libraries, which make it difficult to set up idempotent tests, engineering teams using Tusk Drift can get a full API test suite of over 200 realistic tests within 10 minutes of initializing our SDK.

### How It Works

1. **Record**: Captures traces from live traffic automatically

2. **Replay**: Runs traces as deterministic API tests with mocked outbound calls

3. **Detect**: Surfaces regressions by comparing actual vs. expected output

## Record

In record mode, Drift SDK captures all requests entering and leaving your service (e.g., HTTP, GraphQL, gRPC, database queries, Redis calls).

Under the hood, the SDK instruments your packages to intercept traffic at the service boundary, shown as the dashed border in the diagram below.

<img className="block dark:hidden" src="https://mintcdn.com/tusk/zm1VVGOqLV8ftsCk/images/tusk-drift-explainer-animation-light.gif?s=d0119c49aa07a9fe7f77c4345eb005a4" alt="Tusk Drift animated diagram of data flow in light mode" width="3064" height="1504" data-path="images/tusk-drift-explainer-animation-light.gif" />

<img className="hidden dark:block" src="https://mintcdn.com/tusk/zm1VVGOqLV8ftsCk/images/tusk-drift-explainer-animation-dark.gif?s=aa51cb3b950bc42830f785aef6c9aa50" alt="Tusk Drift animated diagram of data flow in dark mode" width="3046" height="1518" data-path="images/tusk-drift-explainer-animation-dark.gif" />

**SDKs:**

* [Node.js](https://github.com/Use-Tusk/drift-node-sdk)
* [Python](https://github.com/Use-Tusk/drift-python-sdk)
* ...more to come

## Replay

You can run the traces as tests using the [Tusk CLI](https://github.com/Use-Tusk/tusk-cli). This replays the inbound API call while intercepting outbound requests and serving them from recorded data.

Drift’s tests are therefore idempotent, side-effect free, and fast (typically under 50 ms per test). Think of it as a unit test but for your API.

<img src="https://mintcdn.com/tusk/AXxLhdNLOdeh8_1A/images/tusk-drift-cli-demo.gif?s=92d189013b76849536d37fcedca51e9c" alt="Demo of Tusk CLI replaying tests" width="1395" height="810" data-path="images/tusk-drift-cli-demo.gif" />

## Detect

Our [Cloud platform](/api-tests/tusk-drift-cloud) looks at the diff between the expected and actual output, correlates it to the PR's changes, and then classifies if the deviation is intended or unintended.

<img src="https://mintcdn.com/tusk/UaaQ92bMlzV7c1td/images/revamped-ui-v2-api-trace-test-run.png?fit=max&auto=format&n=UaaQ92bMlzV7c1td&q=85&s=f007af77b772bc86b2b352e4391ec2fa" alt="Example API Drift Run page in dark mode" width="3438" height="2164" data-path="images/revamped-ui-v2-api-trace-test-run.png" />

Our AI functionalities do the following automatically:

* Curates a golden test suite with representative coverage of real-world user behavior
* Flags unintended deviations (i.e., regressions), does root cause analysis, and suggests code fixes
* Updates the API test suite to maintain freshness as code logic changes
