AgentSkillsCN

testing

适用于运行测试以验证实现、收集测试证据或调试失败时。在 TEST 状态下加载。涵盖单元测试(pytest/jest)、API 测试(curl)、浏览器测试(Claude-in-Chrome)、数据库验证。所有结果均经代码验证,而非由 LLM 评判。

SKILL.md
--- frontmatter
name: testing
description: "Use when running tests to validate implementations, collecting test evidence, or debugging failures. Load in TEST state. Covers unit tests (pytest/jest), API tests (curl), browser tests (Claude-in-Chrome), database verification. All results are code-verified, not LLM-judged."
keywords: test, verify, pytest, jest, api, browser, evidence

Testing

Comprehensive testing for TEST state.

Instructions

  1. Run unit tests: scripts/run-unit-tests.sh
  2. Run API tests: scripts/run-api-tests.sh
  3. Run browser tests (if UI): via Claude-in-Chrome MCP
  4. Verify database (if data): scripts/verify-database.sh
  5. Collect evidence: scripts/collect-evidence.sh
  6. Report results (code verified, not judged)

Exit Criteria (Code Verified)

bash
# All must return exit code 0
scripts/run-unit-tests.sh
scripts/run-api-tests.sh
[ -f "/tmp/test-evidence/results.json" ]
jq '.all_passed == true' /tmp/test-evidence/results.json

References

FileLoad When
references/unit-testing.mdWriting/running unit tests
references/api-testing.mdTesting API endpoints
references/browser-testing.mdUI testing with Chrome
references/database-testing.mdDatabase verification