agentleFS
aryankumar06aryankumar06/claude-code-skills/test-case-generator-skill/SKILL.md

test-case-generator

Skill16 starsChanged 8 months agoMITView on GitHub

Generate comprehensive test cases based on project code analysis. Use for: unit tests, integration tests, edge case identification, and test suite generation for various programming languages.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. xmh-test/test-agent-skills★ 5same name
    2. WST2002/claude-code-skills★ 4same name
    3. ShreyasBh02/AI-Skills-Collection★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Unit Tests: Test individual functions/methods with various inputs including edge cases.

    line 17
  2. Distinctive:

    Integration Tests: Test interactions between components.

    line 18
  3. Distinctive:

    Implement Test Scripts: Create test files in the appropriate framework (pytest, JUnit, Jest, etc.).

    line 21
  4. Distinctive:

    Validate Tests: Ensure generated tests are syntactically correct and runnable.

    line 22
  5. Distinctive:

    Clean Up: Remove any temporary analysis files.

    line 23

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Test Case Generator

This skill enables the automatic generation of test cases by analyzing project code, understanding its structure, functions, and potential edge cases.

Core Workflow

To generate test cases for a project, follow these steps:

  1. Analyze Project Structure: Examine the codebase to identify functions, classes, modules, and dependencies.
  2. Identify Testable Units: Determine what needs testing (functions, methods, API endpoints, UI components).
  3. Generate Test Cases:
    • Unit Tests: Test individual functions/methods with various inputs including edge cases.
    • Integration Tests: Test interactions between components.
    • Edge Cases: Identify boundary conditions, error scenarios, and unusual inputs.
    • Parameterized Tests: Generate tests with multiple input combinations.
  4. Implement Test Scripts: Create test files in the appropriate framework (pytest, JUnit, Jest, etc.).
  5. Validate Tests: Ensure generated tests are syntactically correct and runnable.
  6. Clean Up: Remove any temporary analysis files.

Bundled Resources

Scripts

  • scripts/generate_tests.py: A template script for analyzing code and generating test cases.

References

  • references/testing_patterns.md: Guide on testing patterns, frameworks, and best practices.

Guidelines for Quality

  • Coverage: Aim for high code coverage by testing all branches and edge cases.
  • Readability: Generate clear, well-documented test cases with descriptive names.
  • Maintainability: Structure tests to be easy to update when code changes.
  • Language Support: Adapt to the project's programming language and testing framework.
  • Automation: Generate tests that can be integrated into CI/CD pipelines.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.