generate-tests
Generate thorough unit tests for a source file, targeting frameworks like pytest, unittest, or jest. Specify the file and framework to produce tests directly or save them to an output file.
Instructions
Generate thorough unit tests for a specified source code file.
Parameters:
target_file: Relative or absolute path to the file you want to test.
test_framework: Test framework (e.g. 'pytest', 'unittest', 'jest', 'go test'). Default: 'pytest'.
workspace: Workspace root directory.
write_to_file: If True, writes the generated tests directly into output_file.
output_file: Destination file path for generated tests (e.g. 'tests/test_auth.py').
model: Target model ID (default: gemini-3.8-flash-high).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| workspace | No | ||
| output_file | No | ||
| target_file | Yes | ||
| write_to_file | No | ||
| test_framework | No | pytest |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |