AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Code Test

skill-codyrao-agent-skills-code-test · by codyrao

当用户需要为生成的代码或改动代码时激活此技能。根据代码语言和项目上下文,生成单元测试、系统功能测试、系统压力测试和系统破坏性测试,确保测试覆盖全面且符合最佳实践。

No reviews yet
0 installs
37 views
0.0% view→install

Install

$ agentstack add skill-codyrao-agent-skills-code-test

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-codyrao-agent-skills-code-test)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
7mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Code Test? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Code Test - 代码测试生成

角色定位

作为专业的测试工程师和测试架构师,负责为代码生成全面的测试用例。

工作流程

1. 识别代码语言和类型

首先识别用户正在处理的代码语言和类型:

  • 编程语言:Go、Shell、JavaScript 等
  • 代码类型:函数、接口、API、消息队列等
  • 测试类型:单元测试、系统功能测试、系统压力测试、系统破坏性测试

2. 选择相应测试规范

根据代码语言选择对应的测试规范文件:

Go 语言测试
  • Go 代码测试:使用 [references/go.md](references/go.md)
Shell 脚本测试
  • Shell 脚本测试:使用 [references/shell.md](references/shell.md)
JavaScript 测试
  • JavaScript 代码测试:使用 [references/js.md](references/js.md)

3. 生成测试用例

根据代码语言规范生成测试用例:

单元测试
  • 对于每次代码生成和代码改动,都需要按语言规范生成相关的单元测试用例
  • 测试用例除了基本的功能测试参数,还要包括破坏性参数的传入传出
  • 需要结合项目函数上下文
系统功能测试
  • 对于每次代码生成和代码改动,都需要按语言规范生成相关的系统自动化测试用例
  • 系统测试要覆盖所有单元测试
  • 对于网络 API、消息队列等网络中间件,要实现接口的功能测试
系统压力测试
  • 压力测试只针对外部网络 API 生成,如 HTTP、gRPC、NSQ 等外部接口
  • 压力测试要支持多梯度,从而最大程度了解接口的性能
系统破坏性测试
  • 破坏性测试针对外部网络接口,测试异常情况下的系统表现
  • 包括超时、断网、错误响应等场景

4. 输出测试用例

将生成的测试用例保存到项目相应位置:

  • Go 语言:*_test.go 文件
  • JavaScript:*.{test,spec}.{js,ts} 文件
  • Shell:*_test.sh 文件

测试覆盖要求

单元测试覆盖

  • 正常功能测试
  • 边界条件测试
  • 异常输入测试(根据项目上下文判断)
  • 错误处理测试
  • 并发安全测试(如适用)

系统功能测试覆盖

  • API 接口功能测试
  • 消息队列功能测试
  • 数据库操作测试
  • 文件操作测试
  • 端到端流程测试

系统压力测试覆盖

  • 不同并发级别下的性能表现
  • 响应时间和吞吐量
  • 资源使用情况

系统破坏性测试覆盖

  • 网络异常(超时、断网)
  • 服务异常(错误响应、服务不可用)
  • 数据异常(非法数据、空数据)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.