Generate Test Code
generate_test_codeGenerate framework-specific test snippets from TestOps test cases by selecting a language and framework, validating compatibility, and synchronizing requested metadata before producing the code.
Instructions
Generate a current, framework-specific test snippet from a TestOps test case.
Both target selections are required. The tool validates verified TestOps language/framework compatibility locally and synchronizes only requested test-case metadata before generation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | Yes | Required target language. Choose Java, Python, TypeScript, JavaScript, Kotlin, PHP, or .NET. Backward-compatible aliases: java, python, ts, js, and dotnet. | |
| metadata | No | Optional metadata to synchronize: Name, Tags, Custom fields, Members, Issues, Scenario. Omit for Name, Tags, Custom fields, Scenario; use [] to disable all. | |
| framework | Yes | Required framework compatible with language. TypeScript choices: CodeceptJS, Cucumber, Jasmine, Jest, Mocha, Playwright, Vitest, WebdriverIO, ZeroStep. Compatibility is language-specific. | |
| test_case_id | Yes | ID of the TestOps test case to generate code for. | |
| output_format | No | Output format: 'json' (default) or 'plain'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Generated source-code snippet. | |
| language | No | Requested target programming language. | |
| metadata | No | Canonical test-case metadata selections included in generated code. | |
| framework | No | Requested target testing framework. | |
| test_case_id | No |