From 1b941a31123411418f4a0e490b71bda40c6adaab Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Fri, 29 Mar 2013 20:01:24 -0400 Subject: [PATCH] AB testing Added libuv to test suite Set port 8000 default unless specified; makes changing shit easier --- Makefile | 11 ++++++----- README.md | 2 +- tests/AutobahnTestSuite/bin/fuzzingserver-libev.php | 3 ++- .../bin/fuzzingserver-libevent.php | 3 ++- tests/AutobahnTestSuite/bin/fuzzingserver-libuv.php | 13 +++++++++++++ .../AutobahnTestSuite/bin/fuzzingserver-noutf8.php | 3 ++- .../AutobahnTestSuite/bin/fuzzingserver-stream.php | 3 ++- tests/AutobahnTestSuite/fuzzingclient-all.json | 11 ++++++----- tests/AutobahnTestSuite/fuzzingclient-quick.json | 2 +- 9 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 tests/AutobahnTestSuite/bin/fuzzingserver-libuv.php diff --git a/Makefile b/Makefile index e413a9a..a1b8a5b 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,12 @@ cover: phpunit --coverage-text --coverage-html=reports/coverage abtests: - ulimit -n 2048 && php tests/AutobahnTestSuite/bin/fuzzingserver-libevent.php & - ulimit -n 2048 && php tests/AutobahnTestSuite/bin/fuzzingserver-stream.php & - ulimit -n 2048 && php tests/AutobahnTestSuite/bin/fuzzingserver-libev.php & - ulimit -n 2048 && php tests/AutobahnTestSuite/bin/fuzzingserver-noutf8.php & - wstest -m testeeserver -w ws://localhost:8004 & + ulimit -n 2048 && php tests/AutobahnTestSuite/bin/fuzzingserver-libevent.php 8002 & + ulimit -n 2048 && php tests/AutobahnTestSuite/bin/fuzzingserver-stream.php 8001 & + ulimit -n 2048 && php tests/AutobahnTestSuite/bin/fuzzingserver-libev.php 8004 & + ulimit -n 2048 && php tests/AutobahnTestSuite/bin/fuzzingserver-libuv.php 8005 & + ulimit -n 2048 && php tests/AutobahnTestSuite/bin/fuzzingserver-noutf8.php 8003 & + wstest -m testeeserver -w ws://localhost:8000 & wstest -m fuzzingclient -s tests/AutobahnTestSuite/fuzzingclient-all.json killall php wstest diff --git a/README.md b/README.md index 41cb523..5cd3fa9 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Build up your application through simple interfaces and re-use your application ##WebSocket Compliance * Supports the RFC6455, HyBi-10+, and Hixie76 protocol versions (at the same time) -* Tested on Chrome 13 - 25, Firefox 6 - 19, Safari 5.0.1 - 6, iOS 4.2 - 6 +* Tested on Chrome 13 - 26, Firefox 6 - 19, Safari 5.0.1 - 6, iOS 4.2 - 6 * Ratchet [passes](http://socketo.me/reports/ab/) the [Autobahn Testsuite](http://autobahn.ws/testsuite) (non-binary messages) ##Requirements diff --git a/tests/AutobahnTestSuite/bin/fuzzingserver-libev.php b/tests/AutobahnTestSuite/bin/fuzzingserver-libev.php index 8069cd2..ccd0613 100644 --- a/tests/AutobahnTestSuite/bin/fuzzingserver-libev.php +++ b/tests/AutobahnTestSuite/bin/fuzzingserver-libev.php @@ -6,7 +6,8 @@ $sock = new React\Socket\Server($loop); $app = new Ratchet\WebSocket\WsServer(new Ratchet\Tests\AbFuzzyServer); - $sock->listen(8002, '0.0.0.0'); + $port = $argc > 1 ? $argv[1] : 8000; + $sock->listen($port, '0.0.0.0'); $server = new Ratchet\Server\IoServer($app, $sock, $loop); $server->run(); diff --git a/tests/AutobahnTestSuite/bin/fuzzingserver-libevent.php b/tests/AutobahnTestSuite/bin/fuzzingserver-libevent.php index df0c419..166bd45 100644 --- a/tests/AutobahnTestSuite/bin/fuzzingserver-libevent.php +++ b/tests/AutobahnTestSuite/bin/fuzzingserver-libevent.php @@ -6,7 +6,8 @@ $sock = new React\Socket\Server($loop); $app = new Ratchet\WebSocket\WsServer(new Ratchet\Tests\AbFuzzyServer); - $sock->listen(8000, '0.0.0.0'); + $port = $argc > 1 ? $argv[1] : 8000; + $sock->listen($port, '0.0.0.0'); $server = new Ratchet\Server\IoServer($app, $sock, $loop); $server->run(); diff --git a/tests/AutobahnTestSuite/bin/fuzzingserver-libuv.php b/tests/AutobahnTestSuite/bin/fuzzingserver-libuv.php new file mode 100644 index 0000000..ccd0613 --- /dev/null +++ b/tests/AutobahnTestSuite/bin/fuzzingserver-libuv.php @@ -0,0 +1,13 @@ + 1 ? $argv[1] : 8000; + $sock->listen($port, '0.0.0.0'); + + $server = new Ratchet\Server\IoServer($app, $sock, $loop); + $server->run(); diff --git a/tests/AutobahnTestSuite/bin/fuzzingserver-noutf8.php b/tests/AutobahnTestSuite/bin/fuzzingserver-noutf8.php index d95a494..589cdd9 100644 --- a/tests/AutobahnTestSuite/bin/fuzzingserver-noutf8.php +++ b/tests/AutobahnTestSuite/bin/fuzzingserver-noutf8.php @@ -7,7 +7,8 @@ $app = new Ratchet\WebSocket\WsServer(new Ratchet\Tests\AbFuzzyServer); $app->setEncodingChecks(false); - $sock->listen(8003, '0.0.0.0'); + $port = $argc > 1 ? $argv[1] : 8000; + $sock->listen($port, '0.0.0.0'); $server = new Ratchet\Server\IoServer($app, $sock, $loop); $server->run(); diff --git a/tests/AutobahnTestSuite/bin/fuzzingserver-stream.php b/tests/AutobahnTestSuite/bin/fuzzingserver-stream.php index 66ff8b5..4e3e797 100644 --- a/tests/AutobahnTestSuite/bin/fuzzingserver-stream.php +++ b/tests/AutobahnTestSuite/bin/fuzzingserver-stream.php @@ -6,7 +6,8 @@ $sock = new React\Socket\Server($loop); $app = new Ratchet\WebSocket\WsServer(new Ratchet\Tests\AbFuzzyServer); - $sock->listen(8001, '0.0.0.0'); + $port = $argc > 1 ? $argv[1] : 8000; + $sock->listen($port, '0.0.0.0'); $server = new Ratchet\Server\IoServer($app, $sock, $loop); $server->run(); diff --git a/tests/AutobahnTestSuite/fuzzingclient-all.json b/tests/AutobahnTestSuite/fuzzingclient-all.json index d290aee..052e75d 100644 --- a/tests/AutobahnTestSuite/fuzzingclient-all.json +++ b/tests/AutobahnTestSuite/fuzzingclient-all.json @@ -3,11 +3,12 @@ , "outdir": "reports/ab" , "servers": [ - {"agent": "Ratchet/0.2.3 libevent", "url": "ws://localhost:8000", "options": {"version": 18}} - , {"agent": "Ratchet/0.2.3 libev", "url": "ws://localhost:8002", "options": {"version": 18}} - , {"agent": "Ratchet/0.2.3 -utf8", "url": "ws://localhost:8003", "options": {"version": 18}} - , {"agent": "Ratchet/0.2.3 streams", "url": "ws://localhost:8001", "options": {"version": 18}} - , {"agent": "AutobahnTestSuite/0.5.9", "url": "ws://localhost:8004", "options": {"version": 18}} + {"agent": "Ratchet/0.2.4 libevent", "url": "ws://localhost:8002", "options": {"version": 18}} + , {"agent": "Ratchet/0.2.4 libuv", "url": "ws://localhost:8005", "options": {"version": 18}} + , {"agent": "Ratchet/0.2.4 libev", "url": "ws://localhost:8004", "options": {"version": 18}} + , {"agent": "Ratchet/0.2.4 -utf8", "url": "ws://localhost:8003", "options": {"version": 18}} + , {"agent": "Ratchet/0.2.4 streams", "url": "ws://localhost:8001", "options": {"version": 18}} + , {"agent": "AutobahnTestSuite/0.5.9", "url": "ws://localhost:8000", "options": {"version": 18}} ] , "cases": ["*"] diff --git a/tests/AutobahnTestSuite/fuzzingclient-quick.json b/tests/AutobahnTestSuite/fuzzingclient-quick.json index 87bfd15..3023fb8 100644 --- a/tests/AutobahnTestSuite/fuzzingclient-quick.json +++ b/tests/AutobahnTestSuite/fuzzingclient-quick.json @@ -3,7 +3,7 @@ , "outdir": "reports/rfc" , "servers": [ - {"agent": "Ratchet", "url": "ws://localhost:8001", "options": {"version": 18}} + {"agent": "Ratchet", "url": "ws://localhost:8000", "options": {"version": 18}} ] , "cases": ["*"]