VSCode extension for the Tomato testing framework - provides Gherkin autocomplete and validation specifically for Tomato steps.
- Autocomplete: Get intelligent suggestions for all Tomato step definitions
- Validation: Warnings for any step that doesn't match a valid Tomato pattern
- Syntax Highlighting: Full Gherkin syntax support
- Formatting: Document formatting including table alignment
- Multi-language: Support for Gherkin keywords in many spoken languages
This extension provides autocomplete and validation for all Tomato step modules:
- Set headers, query params, request bodies (raw/JSON/form)
- Send requests with various HTTP methods
- Assert status codes, headers, body content, JSON paths, response times
- String values with TTL, JSON values, hashes, lists, sets
- Increment/decrement operations
- Assertions on existence, values, TTL, cardinality
- Insert rows via data tables
- Assert table contents, row counts, emptiness
- Execute raw SQL or from files
- Topic creation with partition specification
- Publish messages (text/JSON) with optional keys
- Consume and assert message receipt, order, headers
- Connect/disconnect with optional headers
- Send text/JSON messages
- Assert connection state, message receipt, counts, content
- Set environment variables and working directories
- Execute commands with timeout specifications
- Assert exit codes, stdout/stderr content, file existence
- Install the extension from VS Code marketplace
- Open any
.featurefile - Start typing after a Gherkin keyword (
Given,When,Then,And,But) to see suggestions
Feature: API Testing with Tomato
Scenario: Test user API
Given set "api" request header "Content-Type" to "application/json"
When send "GET" request to "api" "/users/1"
Then "api" response status should be "200"
And "api" response JSON "name" should existInvalid steps will show a warning:
Given I do something invalid # Warning: Unknown tomato step| Setting | Description | Default |
|---|---|---|
tomato.formatConfOverride |
Override formatting indentation | {} |
tomato.onTypeFormat |
Enable on-type formatting | false |
tomato.skipDocStringsFormat |
Skip formatting of doc strings | false |
For autocomplete to work inside strings, add this to your settings:
{
"editor.quickSuggestions": {
"comments": false,
"strings": true,
"other": true
}
}For the complete list of available step definitions, see the Tomato Steps Documentation.
Feel free to create issues on GitHub
MIT