Print Selenium logs on failure #2471

Merged
merged 2 commits into from Oct 24, 2015

Conversation

Projects
None yet
2 participants
@MasonM
Contributor

MasonM commented Oct 22, 2015

WebDriver provides access to the logs for both the client and server, which are sometimes necessary
to debug test failures. This commit modifies Codeception\Module\WebDriver->_failed() to grab all
available logs and print them in human-readable format. The format is identical to what Selenium
Server uses for displaying logs in the console.

MasonM added some commits Oct 22, 2015

Print Selenium logs on failure
WebDriver provides access to the logs for both the client and server, which are sometimes necessary
to debug test failures. This commit modifies Codeception\Module\WebDriver->_failed() to grab all
available logs and print them in human-readable format. The format is identical to what Selenium
Server uses for displaying logs in the console.
@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Oct 24, 2015

Member

Wow, looks great. Thank you! I will try it at home )

Member

DavertMik commented Oct 24, 2015

Wow, looks great. Thank you! I will try it at home )

DavertMik added a commit that referenced this pull request Oct 24, 2015

@DavertMik DavertMik merged commit d6b3a25 into Codeception:2.1 Oct 24, 2015

2 checks passed

continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Nov 12, 2015

Member

I'd cut that to 10 lines and not to display all the logs on end. It's just too much for a screen.... Especially if this is a long and complex test we have the output buffer to be filled overfilled with them

Member

DavertMik commented Nov 12, 2015

I'd cut that to 10 lines and not to display all the logs on end. It's just too much for a screen.... Especially if this is a long and complex test we have the output buffer to be filled overfilled with them

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Nov 12, 2015

Member

10 is not enough. I moved that to configuration. You can change the default value

debug_log_entries: 15

Member

DavertMik commented Nov 12, 2015

10 is not enough. I moved that to configuration. You can change the default value

debug_log_entries: 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment