From eb27bb903ed5d649d2b604d23dff6603e669f5b1 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Thu, 23 Mar 2017 10:25:12 +0100 Subject: [PATCH] server tests --- wstest/Makefile | 52 +++++++++++++++++++++++++++++++++++++-- wstest/fuzzingclient.json | 32 ++++++++++++++++++++++++ wstest/fuzzingserver.json | 11 ++++----- 3 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 wstest/fuzzingclient.json diff --git a/wstest/Makefile b/wstest/Makefile index e4cec7c7..4272b4e1 100644 --- a/wstest/Makefile +++ b/wstest/Makefile @@ -216,15 +216,63 @@ start_server: \ stop_testee_server: - pkill -f "testee_server*" + -pkill -f "testee_server*" -wstest_client: +# test individual server flavor - note that this will only +# produce a single report each, and it cannot be combined into +# a single report! here is the comment from wstest.py + +# allow overriding servers from command line option, providing 1 server +# this is semi-useful, as you cannot accumulate a combined report for +# multiple servers by running wstest over and over again. the generated +# report is only for the last invocation - it would require a massive +# code restructering / rewriting to change that. no time for that unfort. + +test_cpy2_tx_server: ./wstest/bin/wstest -m fuzzingclient -w ws://127.0.0.1:9010 + +test_cpy3_tx_server: ./wstest/bin/wstest -m fuzzingclient -w ws://127.0.0.1:9011 + +test_pypy2_tx_server: ./wstest/bin/wstest -m fuzzingclient -w ws://127.0.0.1:9012 + +test_pypy3_tx_server: ./wstest/bin/wstest -m fuzzingclient -w ws://127.0.0.1:9013 + + +test_cpy2_aio_server: ./wstest/bin/wstest -m fuzzingclient -w ws://127.0.0.1:9014 + +test_cpy3_aio_server: ./wstest/bin/wstest -m fuzzingclient -w ws://127.0.0.1:9015 + +test_pypy2_aio_server: ./wstest/bin/wstest -m fuzzingclient -w ws://127.0.0.1:9016 + +test_pypy3_aio_server: ./wstest/bin/wstest -m fuzzingclient -w ws://127.0.0.1:9017 + + +test_tx_server: \ + test_cpy2_tx_server \ + test_cpy3_tx_server \ + test_pypy2_tx_server \ + test_pypy3_tx_server + +test_aio_server: \ + test_cpy2_aio_server \ + test_cpy3_aio_server \ + test_pypy2_aio_server \ + test_pypy3_aio_server + +# THIS DOES NOT WORK TO PRODUCE THE FINAL COMBINED REPORT FOR ALL SERVERS! +# see above. +#test_server: \ +# test_tx_server \ +# test_aio_server + + +test_server: + ./wstest/bin/wstest -m fuzzingclient diff --git a/wstest/fuzzingclient.json b/wstest/fuzzingclient.json new file mode 100644 index 00000000..dd6f4272 --- /dev/null +++ b/wstest/fuzzingclient.json @@ -0,0 +1,32 @@ +{ + "outdir": "./reports/servers", + "servers": [ + { + "url": "ws://127.0.0.1:9010" + }, + { + "url": "ws://127.0.0.1:9011" + }, + { + "url": "ws://127.0.0.1:9012" + }, + { + "url": "ws://127.0.0.1:9013" + }, + { + "url": "ws://127.0.0.1:9014" + }, + { + "url": "ws://127.0.0.1:9015" + }, + { + "url": "ws://127.0.0.1:9016" + }, + { + "url": "ws://127.0.0.1:9017" + } + ], + "cases": ["*"], + "exclude-cases": [], + "exclude-agent-cases": {} +} diff --git a/wstest/fuzzingserver.json b/wstest/fuzzingserver.json index 89d77d04..b123a777 100644 --- a/wstest/fuzzingserver.json +++ b/wstest/fuzzingserver.json @@ -1,8 +1,7 @@ - { - "url": "ws://127.0.0.1:9001", - "outdir": "./reports/clients", - "cases": ["*"], - "exclude-cases": [], - "exclude-agent-cases": {} + "url": "ws://127.0.0.1:9001", + "outdir": "./reports/clients", + "cases": ["*"], + "exclude-cases": [], + "exclude-agent-cases": {} }