🧪 Skills
Ai Test Generator
AI-powered unit test generator that creates comprehensive tests for your code. Each call charges 0.001 USDT via SkillPay.
v1.0.1
Description
name: ai-test-generator description: AI-powered unit test generator that creates comprehensive tests for your code. Each call charges 0.001 USDT via SkillPay. version: 1.0.0 author: moson tags:
- ai
- testing
- unit-test
- TDD
- test-automation
- quality homepage: https://github.com/moson/ai-test-generator metadata: clawdbot: requires: env: - SKILLPAY_API_KEY triggers:
- "generate tests"
- "write tests"
- "create unit tests"
- "test generation"
- "auto test"
- "write unit tests"
- "test coverage"
- "TDD" config: SKILLPAY_API_KEY: type: string required: true secret: true
AI Test Generator
功能
AI-powered unit test generator that automatically creates comprehensive test suites for your code.
核心功能
- Automatic Test Generation: Generate tests from code instantly
- Boundary Condition Coverage: Test edge cases and error conditions
- Mock Data Generation: Auto-generate realistic mock data
- Integration Tests: Create integration test templates
- Test Coverage Optimization: Suggest missing test cases
- Assertion Generation: Smart assertion helpers
支持的测试框架
- JavaScript: Jest, Mocha, Vitest
- Python: pytest, unittest
- Java: JUnit, TestNG
- Go: testing package
- Rust: #[test]
- Ruby: RSpec, Minitest
使用方法
{
"action": "generate",
"code": "function add(a, b) { return a + b; }",
"language": "javascript",
"framework": "jest",
"test_type": "unit"
}
输出示例
{
"success": true,
"tests": "describe('add', () => { test('adds two numbers', () => { expect(add(1, 2)).toBe(3); }); ... })",
"coverage": "85%",
"test_cases": ["positive numbers", "negative numbers", "zero", "decimals"]
}
价格
每次调用: 0.001 USDT
常见问题
Q: 需要手动修改生成的测试吗? A: 大部分情况下可以直接使用,但建议审查测试逻辑。
Q: 支持哪些测试框架? A: Jest, Mocha, pytest, JUnit 等主流框架都支持。
Q: 能生成集成测试吗? A: 是的,设置 test_type 为 "integration"。
Reviews (0)
Sign in to write a review.
No reviews yet. Be the first to review!
Comments (0)
No comments yet. Be the first to share your thoughts!