Skip to main content
Tusk Drift is an API test automation tool that helps developers detect regressions. We record and 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
  2. Replay: Runs traces as API tests with mocked responses
  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. Tusk Drift animated diagram of data flow in light mode SDKs:

Replay

You can run the traces as tests using the Tusk Drift 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. Demo of Tusk Drift CLI replaying tests

Detect

Our Cloud platform 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. Example API Drift Run page in dark mode Our AI functionalities do the following automatically:
  • Updates the test suite of recorded traces to maintain freshness
  • Matches relevant Drift tests to your PR’s changes when running tests in CI
  • Surfaces unintended deviations (i.e., regressions), does root cause analysis, and suggests code fixes