Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we set default timeout for each test scenario in Cucumber (Java 8) #2561

Closed
smit1208 opened this issue May 31, 2022 · 1 comment
Closed

Comments

@smit1208
Copy link

I am planning to add default timeout to all of my test scenarios (which has multiple Given, When, Then); not planning to add timeouts to individual Given, when, then functions. More specifically looking for a way to add a global timeout.

  • My all test scenarios are running in parallel (multiple threads)
  • Using Java 8 and Appium.

Any leads would be much appreciated.

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Jun 19, 2022

It is not possible to set a global timeout in Cucumber. It is impossible to get the semantics and clean correctly without adding a large amount of complexity to Cucumber (#1694). So instead consider using a library dedicated to waiting, or using existing time-out functionality (e.g. in WebDriver), or re-factoring your system under test to support timeouts, ect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants