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 OSS projects

Contact us

We’d love to hear from you! We’re not really all that evil, and we love discussing potential projects, intriguing ideas, and new opportunities. Complete the form below or drop us a line at surrender@evilmartians.com.

Martians at a glance
16
years in business

A product development consultancy that works with startups and established businesses, while also creating open source-based products and services