Expand description
Shared WebSocket-test driver.
Drives a WebSocketScriptRenderer through the canonical sequence a scripted
WebSocket fixture takes:
render_test_open— language-native test header.render_connect— open WS connection (let conn = client.connect_websocket(path)).- For each scripted message:
direction = send→render_send_text/render_send_json/render_send_binary.direction = receive→render_expect_text/render_expect_json/render_expect_binary.
render_close— close the connection with the expected close code.render_test_close— closing brace /end.
The fixture schema for WebSocket scripts lives in fixtures/websocket*.json —
see the SSE/WS subset in crate::fixture::HttpFixture (currently the WS
schema is loaded as raw JSON; a typed schema will be introduced in a follow-up
once the language renderers are in place and we know exactly which fields
they consume).
Traits§
- WebSocket
Script Renderer - Per-language WebSocket script renderer.
Functions§
- render_
ws_ test - Render a WebSocket script test for
fixturetooutusingrenderer.