sim_expect
Runs firmware in simulation and asserts that specific text or regex patterns appear on UART. Ideal for automated unit & integration testing in a Red-Green-Refactor agent loop.
Instructions
Runs firmware in simulation and asserts that specific text or regex patterns appear on UART. Ideal for automated unit & integration testing in a Red-Green-Refactor agent loop.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chip | No | Target chip family. Default is s3 (ESP32-S3). | |
| wifi | No | Attach a virtual access point with DHCP/DNS/NAT. Spec like 'ssid=demo,psk=secret' (keys: ssid, psk, chan, bssid), or a bare SSID for an open network. Station gets 10.0.2.15. | |
| board | No | Board model: S3 'atech14' (default), 'waveshare-lcd4b', 'waveshare-amoled18-v2', 'waveshare-cam'; C6 'waveshare-c6-lcd147'; ESP32 'ttgo-tdisplay', 'esp32dev-loopback'; 'none' for a bare module. Omit on the C3, which has no boards. See sim_list_boards. | |
| appBin | No | Direct path to the application binary (.bin). | |
| events | No | Optional interaction events before checking patterns. | |
| ordered | No | Whether patterns must appear in exact chronological sequence (default: true). | |
| patterns | Yes | Expected console output. Plain text matches as a substring of a line ("Counter: 5"); write a regular expression between slashes ("/Counter: \\d+/", "/wifi.*connected/i"). | |
| ptableBin | No | Direct path to partition-table.bin (needed with appBin for a real ROM boot). | |
| maxSeconds | No | Max emulated seconds to wait for patterns (default 10). | |
| projectDir | No | Path to the ESP-IDF project root or build folder. If omitted, uses current working directory. | |
| bootloaderBin | No | Direct path to bootloader.bin (needed with appBin for a real ROM boot). |