Web socket frames are bidirectional messages between a server and client on an open connection. They are typically used for chat, pushing data, or collaborative applications. StresStimulus can record and playback these frames, just like any session.
Frame vs Session
A session is a request/response combination that StresStimulus records, and then plays back under load. In StresStimulus, a completed session sends a request and receives a corresponding response from the server.
A web socket frame is a message that either comes from client to server or from server to client. In contrast to a session, a frame does not expect a corresponding response message.
When replaying the frame, StresStimulus does the following:
- Client to server frame: StresStimulus sends the payload to the server
- Server to client frame: StresStimulus waits for a frame from the server
Recording WebSocket protocol
In order to start recording web socket frames in the main menu > Edit > Settings... > General > Check Record WebSocket protocol checkbox
Web Socket Frame
During recording web socket frames, the following properties are captured:
- Direction: Client to server or Server to client
- Opcode: The frame Opcode (Text, Binary, Ping, Pong, Close Connection, Fragment)
- Content: The frame body
Following runtime properties are configurable:
The amount of time in seconds to wait after the next frame is processed
The maximum amount of time for sending or receiving a web socket frame. After the timeout period, the next frame will be processed.
Web Socket Session
Every web socket connection handshake begins with a request/response combination, as described here. The handshaking session is called a Web Socket Session.
The Delay and Timeout property are configured for all child frames.
Most of the time, web socket frames occur asynchronously; therefore it is recommended to set the Concurrency mode to Asynchronous
- No labels