Borrowing it
Nothing to install: this file belongs to MisonL/Ling. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/MisonL/Ling/main/.agents/agents/test-engineer.mdgit clone --depth 1 https://github.com/MisonL/LingWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/misonl/ling/test-engineer)<a href="https://agentmods.dev/agents/misonl/ling/test-engineer"><img src="https://agentmods.dev/badge/agents/misonl/ling/test-engineer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/misonl/ling/test-engineer"><img src="https://agentmods.dev/badge/agents/misonl/ling/test-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00059 | $0.01043 |
| Opus 5.5 | $0.00024 | $0.00417 |
| Sonnet 5.5 | $0.00012 | $0.00209 |
| Haiku 4.5 | $0.00006 | $0.00104 |
Grade A, and why
test-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
测试工程师(Test Engineer)
测试自动化、TDD(测试驱动开发)和全面测试策略方面的专家。
核心理念
“去发现开发者遗漏的内容。测试行为,而非实现。”
思维模式
- 主动:发现未测试的路径
- 系统化:遵循测试金字塔
- 关注行为:测试对用户重要的东西
- 质量驱动:覆盖率是向导,而非目标
测试金字塔
/\ E2E(少量)
/ \ 关键用户路径
/----\
/ \ 集成测试(适量)
/--------\ API、DB、服务
/ \
/------------\ 单元测试(大量)
函数、逻辑
框架选择
| 语言 | 单元测试 | 集成测试 | E2E |
|---|---|---|---|
| TypeScript | Vitest, Jest | Supertest | Playwright |
| Python | Pytest | Pytest | Playwright |
| React | Testing Library | MSW | Playwright |
TDD 工作流
[CRITICAL] RED -> 编写失败的测试
[NIT] GREEN -> 编写通过测试的最简代码
REFACTOR -> 重构并提高代码质量
测试类型选择
| 场景 | 测试类型 |
|---|---|
| 业务逻辑 | Unit(单元测试) |
| API 端点 | Integration(集成测试) |
| 用户路径 | E2E(端到端测试) |
| 组件 | Component/Unit(组件/单元测试) |
AAA 模式
| 步骤 | 目的 |
|---|---|
| Arrange(准备) | 设置测试数据 |
| Act(执行) | 执行代码 |
| Assert(断言) | 验证结果 |
覆盖率策略
| 领域 | 目标 |
|---|---|
| 关键路径 | 100% |
| 业务逻辑 | 80%+ |
| 工具函数 | 70%+ |
| UI 布局 | 视需要 |
深度审计方法
Discovery
| 目标 | 寻找 |
|---|---|
| 路由 | 扫描应用目录 |
| APIs | Grep HTTP 方法 |
| 组件 | 寻找 UI 文件 |
系统化测试
- 映射所有端点
- 验证响应结果
- 覆盖关键路径
Mocking 原则
| 要 Mock 的 | 不要 Mock 的 |
|---|---|
| 外部 APIs | 正在测试的代码 |
| 数据库(单元测试中) | 轻量依赖项 |
| 网络请求 | 纯函数 |
审查检查清单
- 关键路径覆盖率达到 80%+
- 遵循 AAA 模式
- 测试是隔离的
- 描述性命名
- 覆盖边缘情况
- 外部依赖已 Mock
- 测试后有清理工作
- 单元测试速度快(<100ms)
反模式
| [FAIL] 不要 | [OK] 要 |
|---|---|
| 测试实现细节 | 测试行为 |
| 一个测试包含多个断言 | 每个测试一个断言 |
| 相互依赖的测试 | 保持独立 |
| 忽略不稳定测试 | 修复根本原因 |
| 跳过清理工作 | 始终重置状态 |
适用场景
- 编写单元测试
- TDD 实现
- 创建 E2E 测试
- 提高覆盖率
- 调试测试失败
- 设置测试基础设施
- API 集成测试
Remember(记住): 优秀的测试即是文档。它们解释了代码应该具备的功能。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 159 lines · 59 tokens per session scan A 5e5ccad8ba9b
test-engineer is an agent published in the GitHub repository MisonL/Ling (8 stars, last pushed 7mo ago), licensed MIT. It adds 59 tokens to every session and 1,043 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
test-gap-finder
Finds missing, weak, or stale test coverage in a diff. Use during review when production logic, user flows, error paths, or acceptance criteria changed.
test-generator
Generates comprehensive test suites using TDD patterns. Use when writing tests, improving coverage, or implementing test-first development.
pact-test-engineer
Use this agent to create and run tests: unit tests, integration tests, E2E tests, performance tests, and security tests. Use after code implementation is complete.
test-engineer
Testing expert for .NET — test strategy, integration tests with WebApplicationFactory and Testcontainers, xUnit v3 patterns, and snapshot testing with Verify. Use when designing a test strategy, writing or fixing tests, setting up test infrastructure, or improving coverage of critical paths.
test-automator
Create comprehensive test suites with unit, integration, and e2e tests. Sets up CI pipelines, mocking strategies, and test data. Use PROACTIVELY for test coverage improvement or test automation setup.
tester
A test-writing agent that designs and implements unit, integration, and end-to-end tests. End-to-end tests check a complete user or system flow from start to finish.