generate_and_run_tests
Generate Kotlin tests for unit, ViewModel, Flow, Compose UI, and Ktor classes using MockK, Turbine, and Compose rules, and get step-by-step execution instructions.
Instructions
Generates Kotlin Unit tests with MockK, Flow/State verification with Turbine, and Compose UI tests with createComposeRule, along with execution instructions.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"className": "<className>"
},
"name": "generate_and_run_tests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| testType | No | Type of test suite to generate. | viewmodel |
| className | Yes | Name of the class to test (e.g. 'AuthViewModel', 'UserRepository'). | |
| targetCode | No | Optional source code of the class being tested. | |
| methodsToTest | No | List of methods or user flows to cover. |