testgen
Creates comprehensive test suites with edge case coverage for specific functions, classes, or modules by analyzing code paths and identifying failure modes.
Instructions
Creates comprehensive test suites with edge case coverage for specific functions, classes, or modules. Analyzes code paths, identifies failure modes, and generates framework-specific tests. Be specific about scope - target particular components rather than testing everything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | Yes | Test plan for this step. Step 1: outline how you'll analyse structure, business logic, critical paths, and edge cases. Later steps: record findings and new scenarios as they emerge. | |
| model | Yes | Currently in auto model selection mode. CRITICAL: When the user names a model, you MUST use that exact name unless the server rejects it. If no model is provided, you may use the `listmodels` tool to review options and select an appropriate match. Top models: gemini-2.5-pro (score 100, 1.0M ctx, thinking, code-gen); gemini-3-pro-preview (score 100, 1.0M ctx, thinking, code-gen); gemini-2.5-flash (score 61, 1.0M ctx, thinking); gemini-2.0-flash (score 56, 1.0M ctx, thinking); gemini-2.0-flash-lite (score 42, 1.0M ctx). | |
| images | No | Optional absolute paths to diagrams or visuals that clarify the system under test. | |
| findings | Yes | Summarise functionality, critical paths, edge cases, boundary conditions, error handling, and existing test patterns. Cover both happy and failure paths. | |
| confidence | No | Indicate your current confidence in the test generation assessment. Use: 'exploring' (starting analysis), 'low' (early investigation), 'medium' (some patterns identified), 'high' (strong understanding), 'very_high' (very strong understanding), 'almost_certain' (nearly complete test plan), 'certain' (100% confidence - test plan is thoroughly complete and all test scenarios are identified with no need for external model validation). Do NOT use 'certain' unless the test generation analysis is comprehensively complete, use 'very_high' or 'almost_certain' instead if not 100% sure. Using 'certain' means you have complete confidence locally and prevents external model validation. | |
| hypothesis | No | Current theory about issue/goal based on work | |
| step_number | Yes | Current test-generation step (starts at 1) — each step should build on prior work. | |
| temperature | No | 0 = deterministic · 1 = creative. | |
| total_steps | Yes | Estimated number of steps needed for test planning; adjust as new scenarios appear. | |
| issues_found | No | Issues identified with severity levels during work | |
| files_checked | No | Absolute paths of every file examined, including those ruled out. | |
| thinking_mode | No | Reasoning depth: minimal, low, medium, high, or max. | |
| relevant_files | No | Absolute paths of code that requires new or updated tests (implementation, dependencies, existing test fixtures). | |
| continuation_id | No | Unique thread continuation ID for multi-turn conversations. Works across different tools. ALWAYS reuse the last continuation_id you were given—this preserves full conversation context, files, and findings so the agent can resume seamlessly. | |
| relevant_context | No | Methods/functions identified as involved in the issue | |
| next_step_required | Yes | True while more investigation or planning remains; set False when test planning is ready for expert validation. | |
| use_assistant_model | No | Use assistant model for expert analysis after workflow steps. False skips expert analysis, relies solely on your personal investigation. Defaults to True for comprehensive validation. |