測試 Qt WebSockets

Autobahn|Testsuite 標準測試套件對於 WebSocket 協議 ( RFC 6455 ),可以用於測試 Qt WebSockets 的一緻性。參考 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。