An open API service indexing awesome lists of open source software.

https://github.com/antony/websocket-tester

A run-once docker container for testing websocket endpoints as part of a CI build or locally
https://github.com/antony/websocket-tester

ci websocket websocket-client websockets ws

Last synced: about 1 year ago
JSON representation

A run-once docker container for testing websocket endpoints as part of a CI build or locally

Awesome Lists containing this project

README

          

## Websocket Tester

A very simple way to test if a websocket responds (and in the way you expect it to)

Available as a simple node app or a [Docker image](https://hub.docker.com/r/antony/websocket-tester/)

### Usage

Specify the environment variables:

```
URL: The websocket endpoint.
INPUT: input payload to send to socket.
```

and optionally:

```
EXPECTED_OUTPUT: The output you expect (this will be asserted)
```

If you don't pass EXPECTED_OUTPUT, the response will simply be echoed.

Then, just run:

```bash
docker run -e "URL=..." -e "INPUT=..." -e "EXPECTED_OUTPUT=..." antony/websocket-tester
```