tcunit_scaffold
Generate a TcUnit test suite for a TwinCAT function block, creating test methods for each public method and registering it in the .plcproj. Assertions remain TODO stubs.
Instructions
Generate _Tests.TcPOU (TcUnit.FB_TestSuite) with Test_InitialState and one test method per public method, arranged from the FB interface, and register it in the .plcproj. Assertions are left as TODO stubs.
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": {
"fb_name": "<fb_name>"
},
"name": "tcunit_scaffold"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fb_name | Yes | ||
| out_dir | No | ||
| overwrite | No | ||
| add_to_plcproj | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||