Load test your real-time app with every connection held open

Chat, live dashboards, multiplayer games and AI assistants keep thousands of connections open and stream messages both ways. Gatling holds those connections at production concurrency and times every message you wait for, so you see dropped messages and slow replies before your users do.

01 · WHAT GATLING MEASURES

Measure the reply your users wait for, not the handshake

An HTTP test sees a fast handshake and stops. The real work starts after it: messages sent, bursts of replies, timeouts and reconnects on a connection that stays open for minutes. Gatling checks the frames you expect and times them, per virtual user, under load.

ONE CONVERSATION, UNDER LOAD

From connect to the last reply, in one Gatling test

Connectws:// or wss://
Handshakeconnection open
Sendtext or binary frame
Server streamsa burst of replies
Reply checkedmatched and validated
HandshakeWhere most tests stop
Message sent to reply checkedWhat Gatling measures

Each connect, send and check appears side by side in the same Gatling report.

How Gatling does it

CHECKS

Wait for the frame you expect

Await text or binary messages with a timeout and check them with regex or JSON path. A reply that never arrives fails the test.

MATCHING

The right reply in a busy stream

Filter which messages a check considers, so a reply is found among broadcasts and keep-alives. Save values for the next message.

RESILIENCE

Reconnects and several sockets

Reconnect sockets the server closes, cap the attempts, and open several named sockets per virtual user.

02 · USE CASES

Where teams load test WebSocket

WebSocket carries the moments your users see live. These are the flows to test before a launch, a match day or a peak.

AI ASSISTANTS

Chatbots under real concurrency

Thousands of conversations at once, with typing pauses and mid-conversation disconnects. Measure response latency as sessions grow.

CHAT AND COLLABORATION

Messages to every member

Chat rooms, shared documents and presence. Measure the time from a message sent to the replies that come back.

LIVE DATA

Prices, scores and dashboards

Streams that push updates to every connected client. Measure delivery time and missed messages as connections grow.

GAMING

Multiplayer sessions

Players sending moves and receiving game state in real time. Measure round trips and dropped connections at peak.

NOTIFICATIONS

Push to every open session

A broadcast to every connected user at once. Measure how long the last user waits and whether every message arrives.

YOUR APP

A different architecture?

Tell us about the real-time flows that matter to your business. We’ll help you design the right Gatling test.

03 · WHY GATLING

WebSocket testing built into Gatling

Connect, send, check, match, reconnect and close ship with the Gatling HTTP SDK. No plugin to install, no custom client to maintain.

0
plugins to install: WebSocket ships with the HTTP SDK
2
frame types, text and binary, each with its own checks
1
scenario that mixes HTTP calls and WebSocket messages
5
languages: Java, Kotlin, Scala, JavaScript, TypeScript
SECURITY

Secure connections

Connect over wss://, with the same HTTP protocol settings as the rest of your test, configured as code.

INFRASTRUCTURE

Private Locations

Run next to real-time services that aren’t reachable from the internet, with no inbound access to open.

CI/CD

Performance gates with assertions

Set assertions on response time and failed checks per message. If one fails, the Gatling test fails and so does the build.

See Gatling in action

Build, run, and interpret your first load test. A practical session: by the end, you'll know exactly what Enterprise gives you out of the box.

Loading next session...

30 minutes

Live + Q&A

05 · OTHER PROTOCOLS

One platform for every protocol you run

Same Gatling SDK, same reports, same infrastructure.

Also supported: HTTP, JDBC, Server-Sent Events and JMS. See the full tech stack›

FAQ

WebSocket load testing, answered

What teams ask before they run their first WebSocket test with Gatling.

Is WebSocket support included in Gatling Community Edition?

Yes. WebSocket support is part of the Gatling HTTP SDK, with no separate plugin. Gatling Enterprise adds distributed load generators, run history and shared reports.

How do I check messages in a busy stream?

Await a message with a timeout and check it with regex, JSON path or byte checks. Matching filters which messages a check considers, so broadcasts and keep-alives are ignored.

What happens when the server closes the connection?

Gatling can reconnect sockets closed by the server, with a maximum number of attempts, and run a chain of actions after each reconnect.

Can one Gatling test mix HTTP and WebSocket?

Yes. One scenario can log in over HTTP, open a WebSocket, exchange messages and close it, with every step in the same report.

Can a virtual user open several WebSockets?

Yes. Give each socket its own name, and every action targets the socket you choose.

Which Gatling versions and languages are supported?

WebSocket support ships with the Gatling HTTP SDK in Java, Kotlin, Scala, JavaScript and TypeScript.

WEBSOCKET LOAD TESTING WITH GATLING ENTERPRISE

Find out how many live users your app can hold

Bring one real-time flow that matters to your business. We’ll write the test with you and run it against your service in a Gatling Enterprise trial.

Find out where your real-time app breaks

Bring one real-time flow that matters to your business. We'll show you how to test it at production scale with Gatling Enterprise.

Need technical references and tutorials?

Running WebSocket tests locally first?