This folder contains the build infra for creating Docker toolchain images containing AutobahnTestsuite.
You can use it to test WebSocket server (and client) implementations.
By default, the image will run the testsuite in so-called "fuzzingserver" mode. This is the mode used to test your WebSocket client implementations.
To start the testsuite container:
docker run -it --rm \
-v ${PWD}/config:/config \
-v ${PWD}/reports:/reports \
-p 9001:9001 \
--name fuzzingserver \
crossbario/autobahn-testsuite
Above will mount an (included) test configuration from the config folder, which must include a server test configuration file config/fuzzingserver.json like this:
{
"url": "ws://127.0.0.1:9001",
"outdir": "./reports/clients",
"cases": ["*"],
"exclude-cases": [
"9.*",
"12.*",
"13.*"
],
"exclude-agent-cases": {}
}
Above config will run all test cases, but exclude the longer running mass/performance test cases 9., and exclude the WebSocket compression test cases 12./13.* (which only make sense if your client library implements RFC7692 ("permessage-deflate")).
Above command will also mount a host directory/volume reports where the generated reports will be placed by the testsuite.
Finally, the config will make the fuzzing server run on port 9001 - and expose that on the host.
To test multiple clients and generate one big report containing all clients, do NOT stop the testsuite container, but run all your clients, and then stop the container. The generated reports will include all clients.
Here is how to test the Python 3 / asyncio flavor of AutobahnPython:
pip install autobahn
wget https://raw.githubusercontent.com/crossbario/autobahn-python/master/wstest/testee_client_aio.py
python testee_client_aio.py