Timeout on a feature level #4479
Unanswered
nikzupancic
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a bigger collection of test suites which are running on remote devices using Codecept and Webdriverio. Occasionally there will be an issue where devices will stop responding or start responding much slower than usual. In these cases I want to limit the execution time on a
Feature
level. I can do this outside of Codecept by just forcibly killing the process once it reaches the timeout however this will leave me with no logs/reports for tests in that feature.I've looked at the timeouts section in docs but this is geared more towards setting timeouts for each test. This is not feasible for me because in worst case scenarios certain steps can get stuck for more than 2 mins - test timeouts would help to a certain degree but if I have 5 tests timing out in a row it will still add on quite some time to get through all of them.
As I reset the connection to device after each feature is finished setting timeout on a feature level would be much more useful for me: if the whole feature is running for more than 4 mins I'm fairly confident that the result wouldn't be useful and I would need to rerun it anyway.
Is there a way to achieve this kind of timeout in Codecept? One thing I haven't yet considered is creating a custom plugin that would monitor the time since start of suite and compare it to a limit set in config and then just throw an error if that limit has been reached. I'm curious though if anyone has ever tackled something like this and has some input.
Beta Was this translation helpful? Give feedback.
All reactions