Test a WebSocket, an event stream or a gRPC service

Connect to a WebSocket, a Server-Sent Events address or a gRPC method, send messages and check what comes back.

In short

A stream session connects to a WebSocket, a Server-Sent Events address or a gRPC method, sends messages (for a WebSocket or gRPC) and checks what comes back. Save it on a project, run it on its own, or run it as part of a suite step.

Before you start

Steps

  1. Open "Build", choose "Mocks, streams & docs", choose the project and open "Streams".
  2. Press "Try the sandbox event stream". It saves a stream that listens to three order events and opens it.
  3. Press "Run now". The messages appear as they arrive, then the result of each check.
  4. For your own API, press "New stream", choose WebSocket, Server-Sent Events or gRPC beside the address and press "Run now". What is on screen is saved as it runs, so there is no second button. Your streams are listed with their last result.

Result: each check passes or fails against the messages that arrived.

Send messages and check the answers

Call a gRPC method

  1. Choose "gRPC" and give the server address, such as https://grpc.example.com. Use http:// for a server that speaks HTTP/2 without TLS.
  2. Press "Schemas". Add the .proto files of the service (google/protobuf files are built in), or read the schema from the server if it has reflection turned on.
  3. Choose the schema and the method. Press "Fill in a sample message" to start from every field of the request, then change the values.
  4. Open "Metadata" if the server needs it and add each name and value, such as authorization and Bearer {{token}}.
  5. Press "Run now". The answers appear as JSON, with the status the call ended with.

Good to know

If something goes wrong

Related