Skip to content
Back to skills

Test Case Generator

ASecurity

Generate unit test cases from code. Use when the user asks to generate tests, create unit test files, produce Jest/Mocha/Pytest test cases, infer imports, mocks, assertions, parameters, happy paths, edge cases, and error-path coverage from source code.

  • 2 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 12, 2026
testingjavascriptpythonjava

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add whyzsm/tiny-agents --skill test-case-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test Case Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Test Case Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/whyzsm-test-case-generator/badge)](https://www.skillsdirectory.com/skills/whyzsm-test-case-generator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: test-case-generator
description: Generate unit test cases from code. Use when the user asks to generate tests, create unit test files, produce Jest/Mocha/Pytest test cases, infer imports, mocks, assertions, parameters, happy paths, edge cases, and error-path coverage from source code.
---

# Test Case Generator

根据代码自动生成单元测试用例。

## 功能

- 从代码提取函数签名
- 自动生成测试框架代码
- 支持 Jest、Mocha、Pytest
- 智能生成测试参数

## 触发词

- "生成测试"
- "测试用例"
- "unit test"
- "generate test"

## 支持框架

```javascript
// Jest
test('functionName should work', () => {
  expect(result).toBe(expected);
});

// Mocha
it('functionName', () => {
  assert(result === expected);
});

// Python Pytest
def test_function_name():
    assert result is not None
```

## 输出

返回完整的测试文件代码,包含:
- 导入语句
- 测试用例
- Mock 数据
- 断言

Files in this skill

  • SKILL.md963 B
  • agents/openai.yaml213 B
  • source.json571 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.