ktm tests template
Generate a test template for one or more action types
Generate a test template for one or more action types
Usage
ktm tests template <action-types...> [flags]
Examples
# Single API call test
ktm tests template ETH_HTTP_API > api_test.json
# USSD navigation + SMS reception (3 steps)
ktm tests template USSD USSD SMS_GET > ussd_test.json
# Authenticated API flow (3 steps)
ktm tests template ETH_HTTP_API JAVASCRIPT ETH_HTTP_API > auth_test.json
# Then create the test:
ktm tests create --from-file api_test.json --product my-operator~my-product
Arguments
| Argument | Required |
|---|---|
action-types... | Yes |
Details
Generate a complete, minimal, valid test JSON template for the specified action types.
The template includes one action per specified type, with default command fields, example assertions, and a pre-structured variables section. Placeholder values marked with <...> must be filled in before creating the test.
A test can have multiple actions that execute sequentially. Specify multiple action types to create a multi-step test template.
Store property syntax (in template output): message_part (USSD/SMS): property is {INPUT_VAR->output_var}, INPUT_VAR holds regex json_body (API types): property is JSONPath (e.g. $.userId) header: property is HTTP header name status_code, body: property is empty — stores the whole value
Replace <...> placeholders with real device identifiers from 'resources list'.
Related
Global flags (--output, --debug, --host, …) apply to every command. See the command reference overview.
What's next?
Last updated on