Show HN:Tusk Drift – 將生產流量轉化為 API 測試

Show HN:Tusk Drift – 將生產流量轉化為 API 測試

Hacker News·

Tusk Drift 是一個在 Hacker News 上發布的新 CLI 工具,它能讓開發者記錄生產環境的即時流量軌跡,並將其重播為真實的 API 測試。該工具旨在透過利用實際使用者互動來改善測試。

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

To see all available qualifiers, see our documentation.

Record traces from your live traffic and replay them as API tests

License

Uh oh!

There was an error while loading. Please reload this page.

Use-Tusk/tusk-drift-cli

Folders and files

Latest commit

History

Repository files navigation

Image

Tusk Drift is an API test record/replay system that lets you run realistic tests generated from real traffic. This CLI orchestrates local and CI test runs, coordinating with a Tusk Drift SDK and Tusk Drift Cloud.

Image

Image

Image

Image

Image

Image

Image

Image

SDKs:

Features

Image

Try it on a demo repo →

Install

Quick install (recommended)

Linux/macOS:

Install the latest version:

To install a specific version:

Linux additional dependencies (for replay sandboxing):

Without these, sandboxing is disabled and replays run without network isolation. See Architecture - Sandboxing.

Homebrew:

Coming soon.

Windows:

We recommend using WSL for the best experience on Windows. With WSL, you can use the Linux/macOS installation steps above and avoid Windows-specific configuration. For native Windows installation without WSL, expand below to see the steps.

Download tusk-drift-cli_*_Windows_x86_64.zip (or arm64 for ARM-based Windows)

Extract the ZIP file

Move tusk.exe to a directory in your PATH (e.g., C:\tools), or add the extracted directory to your PATH:

Option A: Add to PATH via PowerShell (run as Administrator):

Option B: Add to PATH via System Settings:

Restart your terminal and verify:

Note: Windows requires additional configuration for running tests. See Windows Support for details on TCP communication mode setup.

Manual Download

Download pre-built binaries from GitHub Releases.

Build from source

Quick start

AI-powered setup (recommended)

Use our AI agent to automatically set up Tusk Drift for your service:

The agent will analyze your codebase, instrument the SDK, create configuration files, and test the setup with recording and replay. Supported languages: Python and Node.js.

Manual setup

Alternatively, use the interactive wizard:

This will guide you to create your .tusk/config.yaml config file. You can also create the .tusk directory and config file manually. See configuration docs.

You will need to record traces for your service. See your respective SDK's guide for more details. Once you have traces recorded, you can replay them with the tusk run command.

Local traces (default):

✨ Tusk Drift Cloud

Image

Image

You can use Tusk Drift as API tests in your CI/CD pipeline by running your test suite against commits in your pull requests. Tusk Drift Cloud offers storage of these tests alongside an additional layer of intelligence on deviations detected:

If you used tusk setup, cloud configuration is included. Otherwise, run the cloud onboarding wizard:

For more details, dive into Tusk Drift Cloud docs.

Usage

List traces:

Interactive TUI (default when attached to a terminal):

The TUI is best viewed in a window size of at least 150 x 40.

Run headless mode with JSON output for a single test:

How this program uses your .tusk directory:

We recommend adding to your .gitignore:

Resources

Community

Join our open source community on Slack.

Development

See CONTRIBUTING.md.

License

See LICENSE.

About

Record traces from your live traffic and replay them as API tests

Topics

Resources

License

Contributing

Security policy

Uh oh!

There was an error while loading. Please reload this page.

Stars

Watchers

Forks

Releases

  41

Uh oh!

There was an error while loading. Please reload this page.

Contributors

  6

Image

Image

Image

Image

Image

Image

Languages

Footer

Footer navigation

Hacker News

相關文章

  1. Tusk 2.0

    Product Hunt - AI · 2 個月前

  2. Show HN:Tusk Drift – 自動化 API 測試的開源工具

    5 個月前

  3. Show HN:fluid.sh – 讓基礎設施對 AI 更安全

    3 個月前

  4. Show HN:AI 編碼助手的統一本地可觀測性

    4 個月前

  5. Drift - AI思考時滑動:找回您的等待時間

    Product Hunt - AI · 2 個月前