Closed
Bug 1230368
Opened 10 years ago
Closed 9 years ago
[loadtest] autopush
Categories
(Cloud Services :: QA: Test Automation, defect)
Cloud Services
QA: Test Automation
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: rpapa, Assigned: sphilp)
Details
(Whiteboard: Q1)
autopush loadtests are in Haskell, which might be a barrior to editing/creating new autopush load/API tests.
benbangert provided code template (below) for creating some new tests in python.
http://paste.ofcode.org/CXtYurChvDFvDrzcSuSirV
<benbangert> rpapa: that can be run a single time for verification of whatever you'd like to check, and to add 'recipes' for scaled out load-testing
<benbangert> rpapa: ....the goal here is that its comprehensible and editable by QA, so additional test-plans can be added for smoke-testing and/or spun out over millions of clients during a load-test
-----
def occasional_sender():
uaid = yield connect()
yield hello()
chid, endpoint = yield register(random_chid())
while 1:
yield send_notification(chid, data="some payload")
notif = yield expect_notification(count=1)
assert notif.channel_id == chid
yield wait(5)
| Reporter | ||
Updated•10 years ago
|
Whiteboard: Q1
| Reporter | ||
Comment 1•10 years ago
|
||
| Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Richard Pappalardo [:rpapa][:rpappalardo] from comment #1)
> or better yet:
> https://github.com/mozilla-services/ap-loadtester/tree/feature/bug-1
sample output:
(apenv) ~/Programming/Mozilla/ap-loadtester feature/bug-1 ● python aplt/runner.py
2015-12-04 14:09:26-0800 [-] Log opened.
2015-12-04 14:09:26-0800 [-] Running command: Connect()
2015-12-04 14:09:26-0800 [-] Starting factory <autobahn.twisted.websocket.WebSocketClientFactory object at 0x00007f7ec2ea6e58>
2015-12-04 14:09:26-0800 [WSClientProtocol,client] Handling websocket data: {'messageType': 'connect', 'client': <aplt.client.WSClientProtocol object at 0x00000000029b6e20>}
2015-12-04 14:09:26-0800 [WSClientProtocol,client] Running command: Hello(uaid=None)
2015-12-04 14:09:26-0800 [WSClientProtocol,client] Handling websocket data: {u'status': 200, u'uaid': u'fae8d6587229497e8b921beba8483832', u'use_webpush': True, u'messageType': u'hello', u'env': u'development'}
2015-12-04 14:09:26-0800 [WSClientProtocol,client] Running command: Register(channel_id='2f834326b6a2447b9994c367e6d79029')
2015-12-04 14:09:26-0800 [WSClientProtocol,client] Handling websocket data: {u'status': 200, u'channelID': u'2f834326b6a2447b9994c367e6d79029', u'messageType': u'register', u'pushEndpoint': u'http://lmnt:8082/push/gAAAAABWYg8WwP2Umdvk9Ur2Zqmy9I9AvVnzqe9HX1usGGwqsBAh6arLvYIYpVFbm6IpWI3DpKPk3WH_EYN3dbVG_3xfscaFc_A1ctmr6gSBvFOIG6ah8l2LezA1Ef9MoeE46qpQIJgTok_02MORrpXAAxKPx9Ylz0MayVWMBcfmRZfxKNnNdj0='}
2015-12-04 14:09:26-0800 [WSClientProtocol,client] Running command: SendNotification(endpoint_url=u'http://lmnt:8082/push/gAAAAABWYg8WwP2Umdvk9Ur2Zqmy9I9AvVnzqe9HX1usGGwqsBAh6arLvYIYpVFbm6IpWI3DpKPk3WH_EYN3dbVG_3xfscaFc_A1ctmr6gSBvFOIG6ah8l2LezA1Ef9MoeE46qpQIJgTok_02MORrpXAAxKPx9Ylz0MayVWMBcfmRZfxKNnNdj0=', data=None, ttl=60)
2015-12-04 14:09:26-0800 [-] Starting factory <twisted.web.client._HTTP11ClientFactory instance at 0x00007f7ec3c42b80>
2015-12-04 14:09:26-0800 [WSClientProtocol,client] Handling websocket data: {u'version': u'gAAAAABWYg8WuUdE1itsFpEpczUq9poSTXZOkjhazXMGxrvfM1I6mvxDoxxSeL6rj2cni5-1srNS9gfXfBC6mA656tlo6Kw731xmaJzgxkyygumtV5-DEdBSXX8KAMBJtvxWO3F6HFEaHK95noj6uKYwzFamnNH7e_O8YqXQ5X_4NNle8SJtY5Y=:', u'channelID': u'2f834326b6a2447b9994c367e6d79029', u'messageType': u'notification'}
2015-12-04 14:09:26-0800 [HTTP11ClientProtocol,client] Response: 201
2015-12-04 14:09:26-0800 [HTTP11ClientProtocol,client] Running command: ExpectNotification(channel_id=u'2f834326b6a2447b9994c367e6d79029', time=5)
2015-12-04 14:09:26-0800 [HTTP11ClientProtocol,client] Got notif: {u'version': u'gAAAAABWYg8WuUdE1itsFpEpczUq9poSTXZOkjhazXMGxrvfM1I6mvxDoxxSeL6rj2cni5-1srNS9gfXfBC6mA656tlo6Kw731xmaJzgxkyygumtV5-DEdBSXX8KAMBJtvxWO3F6HFEaHK95noj6uKYwzFamnNH7e_O8YqXQ5X_4NNle8SJtY5Y=:', u'channelID': u'2f834326b6a2447b9994c367e6d79029', u'messageType': u'notification'}
2015-12-04 14:09:26-0800 [HTTP11ClientProtocol,client] Running command: UnRegister(channel_id=u'2f834326b6a2447b9994c367e6d79029')
2015-12-04 14:09:26-0800 [WSClientProtocol,client] Handling websocket data: {u'status': 200, u'channelID': u'2f834326b6a2447b9994c367e6d79029', u'messageType': u'unregister'}
2015-12-04 14:09:26-0800 [WSClientProtocol,client] Running command: Disconnect()
2015-12-04 14:09:26-0800 [-] Connection to/from tcp4:127.0.0.1:8080 was closed cleanly
2015-12-04 14:09:26-0800 [WSClientProtocol,client] Handling websocket data: {'messageType': 'disconnect', 'was_clean': True, 'code': 1000, 'reason': None}
2015-12-04 14:09:26-0800 [-] Stopping factory <autobahn.twisted.websocket.WebSocketClientFactory object at 0x00007f7ec2ea6e58>
2015-12-04 14:09:26-0800 [-] Stopping factory <twisted.web.client._HTTP11ClientFactory instance at 0x00007f7ec3c42b80>
2015-12-04 14:09:26-0800 [-] Main loop terminated.
| Reporter | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•