autobahn-testsuite
autobahn-testsuite copied to clipboard
Document CI integration and testsuite Docker usage
It would be good to have instructions about how to use this with GitHub Actions.
I could not get the instructions to work without explicitly specifying the spec file:
docker run -it --rm -v "$(pwd)/config:/config" -v "$(pwd)/reports:/reports" -p 9001 --name wstest crossbario/autobahn-testsuite wstest -m fuzzingclient -s /config/fuzzingclient.json
Even thought config/fuzzingclient.json exists, without -s /config/fuzzingclient.json it won't load it.
for non-Dockerized CI, you might have a look at:
https://github.com/crossbario/autobahn-python/blob/master/wstest/Makefile https://github.com/crossbario/autobahn-python/blob/master/.github/workflows/wstest.yml
the testees are run non-Dockerized, but the testsuite is Dockerized:
https://github.com/crossbario/autobahn-python/blob/49c41440e16528ee6ab267df0f9989fb1ed81f7c/wstest/Makefile#L131
I figured out how to do it:
Here is the actions file: https://github.com/socketry/protocol-websocket/blob/main/.github/workflows/autobahn-server-tests.yaml
Here is the executable that runs docker and the tests:
https://github.com/socketry/protocol-websocket/blob/58f0d15c6c5b44d224fd7a6eb237ce331bd8a587/autobahn-tests/autobahn-server-tests.rb