Generate Code Tests Tool
generate-code-testsUse this when the user supplies source code and asks to generate unit, feature, integration, or framework-specific tests. State-changing generation action: consumes AI credits, creates a generation, and returns test code after authorization. Use browser guidance for local uploads or repository-wide test generation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional custom name used to identify the tests in generation history | |
| filename | Yes | The full file path of the file being tested (e.g., src/utils/helper.ts) | |
| test_type | No | Type of tests to generate (e.g., "unit tests", "integration tests") | |
| source_code | Yes | The source code to generate tests for | |
| test_framework | No | Testing framework to use (e.g., "Jest", "PHPUnit", "JUnit") or "auto-detect" | |
| additional_instructions | No | Additional instructions for test generation |