- Home
- Skills
- Testing & Debugging
- Test Generator
Test Generator
by zihan Y
Get unit tests for any code function that cover happy paths, edge cases, and error branches automatically.
$9
What it does
- Analyzes function signatures to identify valid and invalid input types
- Lists every decision point and branch in the code to ensure full coverage
- Categorizes tests into happy paths, boundaries, and error branches
- Generates descriptive test names that explain the expected behavior
- Writes assertions that check for exact return values and error reasons
- Scaffolds test skeletons for Javascript and Python files automatically
Who it's for
Software developers writing new code
Stop staring at a blank test file and get full coverage of your functions instantly.
Try asking: “Write tests for my new payment processing function in this file.”
Lead engineers and code reviewers
Quickly check if a teammates code has missing edge cases or weak test logic.
Try asking: “Check these tests for missing boundary cases.”
Programming students and learners
Learn the right way to test by seeing how to break down logic into testable cases.
Try asking: “Explain what cases I should test for this calculator script.”
Test Generator
Example session with this skill installed
I have a Javascript function that calculates shipping rates based on weight and destination. Can you write the unit tests for it?
- Read your context and instructions
- Compiled the test generator
I will analyze your shipping rate function and generate a complete set of unit tests covering the normal logic, edge cases, and potential errors.
Based on the logic in your function, here are the test cases I have identified:
- Happy Path: A standard 10kg package to a local zone. This confirms the basic math works.
- Boundary: A package at exactly the 100kg limit where the rate jumps to the next tier.
- Error Branch: An unsupported destination country code like "ZZ".
- Null/Abnormal: A request with a negative weight or a missing destination.
I have generated the following tests using the node:test format:
// Tests for calculateRate
it("calculates standard $15 rate for 10kg to Zone A", () => { ... });
it("applies the bulk discount exactly at 100kg", () => { ... });
it("returns an error for unsupported country codes", () => { ... });
it("returns null if weight is zero or negative", () => { ... });
Each test focuses on one behavior. Would you like me to run the Python script to scaffold this into a full test file for you?
Connects securely to your tools. The creator never sees your data.
About this skill
If you write code but hate writing tests, or you never know which cases to cover, this skill is for you. It helps you look at any function and find the exact spots where it might break. Instead of just testing the easy parts, it guides your AI agent to hunt for edge cases, errors, and empty inputs that usually cause bugs.
How it works
- You provide a function or a code file to your AI agent.
- The skill analyzes the code to find every decision point, like if-statements and defaults.
- It creates a list of test cases across five categories: happy path, boundaries, errors, null inputs, and state.
- It writes clear, focused tests with descriptive names that tell you exactly what is being checked.
Frameworks & tools
The skill works with any programming language. It includes a Python script that can automatically build a test file skeleton from your Javascript or Python source files.
Why this beats prompting it yourself
Most AI agents write "happy path" tests that only prove the code works when everything is perfect. This skill follows a strict method to ensure you cover boundaries and error branches that typical prompts miss. It uses a specific naming convention so your test reports actually make sense when something fails.
Use cases
- Generating a full suite of unit tests for a brand new function
- Finding missing edge cases in a file that already has some tests
- Scaffolding a test file for a legacy script you need to refactor
- Learning how to properly name and structure assertions for better code quality
Known limitations
This skill works best for functions where input goes in and a value comes out. It is less effective for code that relies heavily on external databases or complex visual interfaces.
Built for any LLM. Includes a scripts/scaffold.py tool to generate boilerplate test files from .js and .py source code. Follows a 5-step methodology: signature analysis, branch listing, 5-category case selection (Happy, Boundary, Error, Null, State), behavioral naming, and output-based assertions. Useful for creating deterministic unit tests with clear regression paths.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed today
Permissions
What's inside
Creator
zihan Y
4 skills on Agensi
Frequently Asked Questions
New in Testing & Debugging
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.