test-engineer

A testing-focused coding assistant for writing and organizing software tests. It covers test-driven development (TDD), where you write a failing test before the code that makes it pass, plus unit, integration, and end-to-end testing.

In plain words
What is it for?
Use it to write tests, improve coverage, debug failures, and review application routes, APIs, components, and user flows. It mentions Jest, Vitest, Pytest, Testing Library, Supertest, MSW, and Playwright.
Why use it?
It helps find untested user paths and diagnose failing tests. It also helps choose an appropriate test type instead of relying only on code-coverage percentages.

Agent for Codex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/misonl/ling/test-engineer
Clone the repo
git clone --depth 1 https://github.com/MisonL/Ling

Made for: Codex.

Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,043 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00059 $0.01043
Opus 5 $0.00030 $0.00522
Sonnet 5 $0.00012 $0.00209
Haiku 4.5 $0.00006 $0.00104

Measured yesterday against content hash 5e5ccad8ba9b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 yesterday.

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.

.agents/agents/test-engineer.md · 159 lines

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 文件

系统化测试

  1. 映射所有端点
  2. 验证响应结果
  3. 覆盖关键路径

Mocking 原则

要 Mock 的 不要 Mock 的
外部 APIs 正在测试的代码
数据库(单元测试中) 轻量依赖项
网络请求 纯函数

审查检查清单

  • 关键路径覆盖率达到 80%+
  • 遵循 AAA 模式
  • 测试是隔离的
  • 描述性命名
  • 覆盖边缘情况
  • 外部依赖已 Mock
  • 测试后有清理工作
  • 单元测试速度快(<100ms)

反模式

[FAIL] 不要 [OK] 要
测试实现细节 测试行为
一个测试包含多个断言 每个测试一个断言
相互依赖的测试 保持独立
忽略不稳定测试 修复根本原因
跳过清理工作 始终重置状态

适用场景

  • 编写单元测试
  • TDD 实现
  • 创建 E2E 测试
  • 提高覆盖率
  • 调试测试失败
  • 设置测试基础设施
  • API 集成测试

Remember(记住): 优秀的测试即是文档。它们解释了代码应该具备的功能。

Changes

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.

  1. yesterday First seen · 159 lines · 59 tokens per session scan A 5e5ccad8ba9b

Subscribe to this mod's changes

test-engineer is an agent published in the GitHub repository MisonL/Ling (9 stars, last pushed 5mo ago), licensed MIT. It adds 59 tokens to every session and 1,043 once invoked, about $0.0003 per session on Opus 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.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens