agentleFS
xu-xiangxu-xiang/everything-claude-code-zh/.cursor/rules/common-testing.md

everything-claude-code-zh / rules

Cursor rule2k starsChanged 9 months agoMITView on GitHub

测试要求:80% 覆盖率、TDD 工作流、测试类型

Trending

More talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the xu-xiang/everything-claude-code-zh repository that our weekly crawl found: only 1 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about xu-xiang/everything-claude-code-zh

The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.

The file

Files
common-testing.md

测试要求 (Testing Requirements)

最低测试覆盖率:80%

测试类型(全部必选):

  1. 单元测试 (Unit Tests) - 独立函数、工具类、组件
  2. 集成测试 (Integration Tests) - API 接口、数据库操作
  3. 端到端测试 (E2E Tests) - 关键用户流程(根据语言选择框架)

测试驱动开发 (Test-Driven Development)

强制 (MANDATORY) 工作流:

  1. 先编写测试(红灯阶段 - RED)
  2. 运行测试 - 应当失败 (FAIL)
  3. 编写最小化实现(绿灯阶段 - GREEN)
  4. 运行测试 - 应当通过 (PASS)
  5. 重构(改进阶段 - IMPROVE)
  6. 验证覆盖率 (80%+)

测试失败排查

  1. 使用 tdd-guide 智能体 (Agent)
  2. 检查测试隔离性 (Test Isolation)
  3. 验证 Mock 是否正确
  4. 修复实现逻辑,而非测试代码(除非测试用例本身有误)

智能体支持 (Agent Support)

  • tdd-guide - 主动 (PROACTIVELY) 用于新功能开发,强制执行“测试先行 (Write-tests-first)”原则

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.