TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Tutorial

Learn WebSocket testing

Most API tests send a request and check the answer. A WebSocket doesn't work that way. The connection stays open, messages arrive when the server decides to send them, and the most common bugs happen when the connection ends rather than while it's working.

These lessons assume you know what an HTTP request is. If not, start with the API testing tutorial. Every example connects to the two sockets at wss://api.testingapis.com: one echoes what you send, one pushes a stock price every second. The messages and close codes shown are the ones they actually sent, and most lessons let you open the socket from the page. Both sockets need a free account; the examples and Connect buttons work once you're signed in.

8 lessons3 levelsFree