Network assertions also cover API calls that you make directly in an objective, not only the requests the page makes on its own. The agent records its own calls, and you query them with the same fields listed below. To make a call, for example to seed data or call a backend, see API Calls.
How Capture Works
KaneAI captures all HTTP network traffic automatically during each test step:- Continuous capture: Every HTTP request and response is recorded as it happens
- Per-step scope: Each test step starts with a fresh capture. Traffic from previous steps is not carried over
- Limits: Up to 5,000 requests are stored per step. When the limit is reached, the oldest 10% of entries are dropped to make room. Response bodies are capped at 64KB per entry
- Text bodies only: Response bodies are captured for text-based content types (JSON, HTML, XML, CSS, JavaScript). Binary content (images, fonts, videos) is skipped
- Multi-tab support: Traffic from new tabs and popups is also captured
Planning for Multi-Step Tests
Network data resets at every step, so plan for it:- If you need to assert on an API response later, extract and store it in the same step the request happens
- Navigation and API calls in step 1 won’t be visible in step 3’s network log
- Use extraction checkpoints to save values across steps
What You Can Query
Example Assertions
Example Extractions
Example If/Else
WebSocket and SSE Capture (Experimental)
Kane CLI can also capture WebSocket and server-sent events (SSE) traffic. Turn it on withrun --network-ws and run --network-sse. Both are off by default, and SSE capture works only in Chromium. To keep a setting across runs, use config set-network-ws on|off or config set-network-sse on|off. testmd run and testrun run do not accept these flags.