What's Happening
I'm writing acceptance tests with selenium-python and pytest on python 2.7.
Whenever a test fails the CLI output is flooded with debug
output under ---captured log call---
for every failed test.
Example
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "valueFx"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-1'}}
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element/0.40203467536832127-1/click {"sessionId": "3561e266d0c9 dd090e0a4d68923e9c1f", "id": "0.40203467536832127-1"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': None}
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "leftValue"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-28'} }
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "rightValue"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-29'} }
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "leftFXMove"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-30'} }
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "RightFXMove"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-31'} }
remote_connection.py 480 DEBUG GET http://127.0.0.1:52030/session/3561e266d0c 9dd090e0a4d68923e9c1f/element/0.40203467536832127-28/text {"sessionId": "3561e266d0c9d d090e0a4d68923e9c1f", "id": "0.40203467536832127-28"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': u''}
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "leftValue"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-28'} }
remote_connection.py 480 DEBUG GET http://127.0.0.1:52030/session/3561e266d0c 9dd090e0a4d68923e9c1f/element/0.40203467536832127-28/text {"sessionId": "3561e266d0c9d d090e0a4d68923e9c1f", "id": "0.40203467536832127-28"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': u''}
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "leftValue"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-28'} }
remote_connection.py 480 DEBUG GET http://127.0.0.1:52030/session/3561e266d0c 9dd090e0a4d68923e9c1f/element/0.40203467536832127-28/text {"sessionId": "3561e266d0c9d d090e0a4d68923e9c1f", "id": "0.40203467536832127-28"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': u''}
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "leftValue"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-28'} }
remote_connection.py 480 DEBUG GET http://127.0.0.1:52030/session/3561e266d0c 9dd090e0a4d68923e9c1f/element/0.40203467536832127-28/text {"sessionId": "3561e266d0c9d d090e0a4d68923e9c1f", "id": "0.40203467536832127-28"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': u''}
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "leftValue"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-28'} }
remote_connection.py 480 DEBUG GET http://127.0.0.1:52030/session/3561e266d0c 9dd090e0a4d68923e9c1f/element/0.40203467536832127-28/text {"sessionId": "3561e266d0c9d d090e0a4d68923e9c1f", "id": "0.40203467536832127-28"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': u''}
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "leftValue"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-28'} }
remote_connection.py 480 DEBUG GET http://127.0.0.1:52030/session/3561e266d0c 9dd090e0a4d68923e9c1f/element/0.40203467536832127-28/text {"sessionId": "3561e266d0c9d d090e0a4d68923e9c1f", "id": "0.40203467536832127-28"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': u''}
remote_connection.py 480 DEBUG POST http://127.0.0.1:52030/session/3561e266d0 c9dd090e0a4d68923e9c1f/element {"using": "id", "sessionId": "3561e266d0c9dd090e0a4d689 23e9c1f", "value": "leftValue"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': {u'ELEMENT': u'0.40203467536832127-28'} }
remote_connection.py 480 DEBUG GET http://127.0.0.1:52030/session/3561e266d0c 9dd090e0a4d68923e9c1f/element/0.40203467536832127-28/text {"sessionId": "3561e266d0c9d d090e0a4d68923e9c1f", "id": "0.40203467536832127-28"}
remote_connection.py 567 DEBUG Finished Request {u'status': 0, u'sessionId': u'3561e266d0c9dd090e0a4d68923e9c1f', u'value': u'-110459.82231227'}
That's for 1 test failure!
When I have N failures, this debug
output is multiplied for every test. Compared to the 10-20 lines pytest outputs showing my failed test and the exception raised, this is both needlessly verbose and time-consuming to search through.
Running in quiet mode doesn't remove this output either.
pytest tests/acceptance/pricers/test_fxfwd.py -q
or running with multiple flags of -q
...