测试 Qt WebSockets

Autobahn|Testsuite , a standard test suite for WebSocket Protocol ( RFC 6455 ), can be used for testing the conformance of Qt WebSockets. Refer to Autobahn|Testsuite 安装文档编制 去设置测试套件。

测试 Qt WebSockets 采用 Autobahn|Testsuite

wstest - fuzzingserver 模式

cd your_build_dir/tests/manual/compliance
qmake your_src_dir/tests/manual/compliance/compliance.pro
make
cd ~
wstest -m fuzzingserver
					

然后,在另一终端:

cd your_build_dir/tests/manual/compliance
./tst_compliance
					

测试结果将生成在 ~/reports/clients 目录下。浏览器指向 ~/reports/clients/index.html。

wstest - fuzzingclient 模式

cd your_build_dir/examples/websockets/echoserver
qmake your_src_dir/examples/websockets/echoserver/echoserver.pro
make
./echoserver -p 9001
					

然后,在另一终端:

cd ~
wstest -m fuzzingclient
					

测试结果将生成在 ~/reports/servers 目录下。浏览器指向 ~/reports/servers/index.html。