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

Let's solve your hard problems

Martians at a glance
18
years in business

We're experts at helping developer products grow, with a proven track record in UI design, product iterations, cost-effective scaling, and much more. We'll lay out a strategy before our engineers and designers leap into action.

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