测试Qt WebSockets

Autobahn|Testsuite 是 WebSocket 协议(RFC 6455)的标准测试套件,可用于测试Qt WebSockets 的一致性。请参阅Autobahn|Testsuite 安装文档设置测试套件。

使用 Autobahn|Testsuite 测试Qt WebSockets

wstest - 模糊服务器模式

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 - 模糊测试客户端模式

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。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.