展示HN:Tusk Drift – 开源的API测试自动化工具
Show HN: Tusk Drift – Open-source tool for automating API tests

原始链接: https://github.com/Use-Tusk/drift-node-sdk

## Tusk Drift SDK:快速且确定性的 API 测试 Tusk Drift SDK (Node.js) 通过捕获和重放真实的 API 调用来简化 API 测试。这使得快速、确定性的回归测试成为可能,而无需实时环境的副作用。 自动记录 API 交互,然后使用 Tusk CLI 重放它们,从而快速识别回归。Drift 在重放期间拦截外发请求,使用记录的数据以获得一致的结果。 目前,Tusk Drift 支持广泛的流行包,包括 HTTP/HTTPS、gRPC、PostgreSQL、Firestore、Redis、GraphQL、Prisma 和 JWT 库(有关特定版本,请参阅文档)。欢迎通过 GitHub issue 提出对更多包的支持。 入门涉及安装 Tusk CLI、配置 Tusk、安装 `@use-tusk/drift-node-sdk` 包以及为您的服务初始化 SDK。全面的指南和文档在线提供,并通过 Slack 提供社区支持。

相关文章

原文

Tusk Drift Banner

npm version License: Apache 2.0 GitHub last commit Tusk X account Tusk Community Slack

The Node.js Tusk Drift SDK enables fast and deterministic API testing by capturing and replaying API calls made to/from your service. Automatically record real-world API calls, then replay them as tests using the Tusk CLI to find regressions. During replay, all outbound requests are intercepted with recorded data to ensure consistent behavior without side-effects.

For comprehensive guides and API reference, visit our full documentation.

Tusk Drift currently supports the following packages and versions:

If you're using packages or versions not listed above, please create an issue with the package + version you'd like an instrumentation for.

First, install and configure the Tusk Drift CLI by following our CLI installation guide. The CLI helps set up your Tusk configuration file and replays tests.

The wizard will eventually direct you back here when it's time to set up the SDK.

After completing the CLI wizard, install the SDK:

npm install @use-tusk/drift-node-sdk

Step 3: Initialize the SDK for your service

Refer to our initialization guide to set up the SDK for your service.

Step 4: Run Your First Test

Follow along our quick start guide to record and replay your first test!

Having issues?

Join our open source community on Slack.

We appreciate feedback and contributions. See CONTRIBUTING.md.

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

联系我们 contact @ memedata.com