Add Bruno v3.0 request for testing WebSocket endpoint: - WebSocket connection type - JWT token authentication via query parameter - Ping message body for heartbeat testing - Assertions for successful WebSocket upgrade (101 status) Provides API documentation and testing capability for WebSocket connection functionality per project standards.
31 lines
482 B
Plaintext
31 lines
482 B
Plaintext
meta {
|
|
name: "WebSocket - Connect and Receive Updates"
|
|
type: websocket
|
|
seq: 1
|
|
}
|
|
|
|
vars {
|
|
token: ""
|
|
}
|
|
|
|
websocket {
|
|
url: "{{ baseUrl }}/ws/sync?token={{ token }}"
|
|
body: {
|
|
type: "ping",
|
|
timestamp: "2026-01-30T20:00:00Z"
|
|
}
|
|
auth: {
|
|
type: bearer
|
|
token: "{{ token }}"
|
|
}
|
|
headers: {
|
|
Authorization: "Bearer {{ token }}"
|
|
}
|
|
}
|
|
|
|
assert {
|
|
res.status == 101
|
|
res.headers.contains("Connection", "upgrade")
|
|
res.headers.contains("Upgrade", "websocket")
|
|
}
|