wsdirector

WebSocket Director is command-line tool and a library which aimed to automate black-box testing of WebSocket
servers (Action Cable, AnyCable, Elixir Phoenix, etc.) using human-readable scenarios (stored as YAML or JSON).

All you need is to gem install wsdirector-cli, create a YAML file and run it. For example, consider an Action Cable scenario interacting with the echo channel:

# script.yml
- client:
  protocol: action_cable
  actions:
    - subscribe:
        channel: "EchoChannel"
    - perform:
        channel: "EchoChannel"
        data:
          text: "Hey!"
    - receive:
        channel: "EchoChannel"
        data:
          response: "Hey!"

You can run it using the following command:

$ wsdirector -u localhost:3000/cable -f script.yml

1 client, 0 failures

WebSocket Director could be used as a helper tool in development as well as a building block for automated tests.

Author

In the same orbit

Explore more open source projects

How can we help you?

Martians at a glance
17
years in business

We transform growth-stage startups into unicorns, build developer tools, and create open source products.

If you prefer email, write to us at surrender@evilmartians.com