test-gen
Automated test generation with edge case analysis and framework-native syntax for TS, Python, Go, and Rust.
skill install https://www.promptspace.in/skills/test-genComprehensive Automated Unit Testing
Writing unit tests is often the most time-consuming part of the development cycle. This skill automates the entire process by analyzing your source code and generating high-quality, framework-idiomatic tests. It doesn't just write "happy path" assertions; it deeply analyzes function signatures and logic to identify edge cases, boundary values, and potential error states that you might have missed.
What it does
- Smart Framework Detection: Automatically identifies your project's testing stack (Jest, Vitest, Pytest, Go testing, or JUnit) by scanning configuration files like
package.jsonorCargo.toml. - Context-Aware Generation: Parses your TypeScript, JavaScript, Python, Go, or Rust files to extract exports, classes, and functions.
- Edge Case Analysis: Generates specific test cases for null/undefined inputs, empty strings, maximum boundaries, and async rejections.
- Zero-Config Mocking: Detects external dependencies and sets up framework-specific mocks for HTTP, DB, and filesystem calls.
Why use this skill?
Unlike basic AI prompting, this skill follows a structured multi-step engineering process. It ensures imports are correct, prevents syntax errors, and places files according to project-specific naming conventions (e.g., *.test.ts vs test_*.py). It saves developers hours of boilerplate work while increasing code coverage and reliability without requiring manual intervention.
Use cases
- Automatically detect and adapt to existing Jest, Pytest, or Vitest setups.
- Generate full test coverage for untested legacy files in a single pass.
- Create robust mocks for external API calls and database interactions.
- Ensure 100% coverage of boundary values and common error conditions.
Example
Prompt
Sample output preview is available after purchase.