— No reviews yet
0 installs
6 views
0.0% view→install
Install
$ agentstack add skill-hellyguo-self-ai-spec-java-gen-unittest ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
Are you the author of Java Gen Unittest? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claimAbout
生成单元测试代码
概述
读取现有的Java代码,生成单元测试代码,
过程
- 遍历所有的java,确保对代码之间联系有清晰认识,必要时,可通过 skill /code-deconstruct 先行进行解构分析
- 对java文件解析,进行构建单元测试。主要目标为 public 方法。
- 对可能需要外部数据的外部依赖的,进行mock,保证代码可执行,可使用库:mockito/powermock
- 如果需要数据库,可选择在 maven test scope 引入使用 h2 数据库模拟;也可以选择通过 mockito/powermock 模拟数据库
- 最终生成一个suite,包裹所有单元测试,可一次性执行所有测试(如已存在suite,将生成的单元测试补入其中)
输出
按 Java 的 maven 约定,写入 src/test/java 对应的 package 下
核心原则
尽可能测试到所有的方法,所有的分支,保证方法覆盖率/分支覆盖率
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: hellyguo
- Source: hellyguo/self-ai-spec
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.