-
Notifications
You must be signed in to change notification settings - Fork 23
Description
My test runner fails when asynchronous tests run for longer than some given timeout. The bottleneck for each test is the communication with the browser instance through Leadfoot. Currently, to avoid timeout failures for long tests, I have two options:
- Set the timeout for all tests to the time required to run the longest test
- Set the timeout for each test according to its needs
While #1 is succinct, it tends to make test failures require more time than necessary. #2 is more efficient, but it requires explicit management of the timeout value.
If the Leadfoot Command object offered a "send" hook as a signal each time it issued a command to the WebDriver server, then I could hook into this and re-set the timeout whenever any test attempted to communicate with the server. This could be implemented as a generic event, but for this use case, a single callback provided to the Command constructor would also work.
Would the maintainers consider a feature like this in scope? If so, I'd be happy to submit a patch!