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

Timeout for steps #1095

Closed
volnoboy opened this issue Jan 29, 2018 · 5 comments
Closed

Timeout for steps #1095

volnoboy opened this issue Jan 29, 2018 · 5 comments

Comments

@volnoboy
Copy link

This is not a bug, but a feature request. I am using Jbehave.

I didn't find any feature similar to Junit: @test(timeout = 100)

Is it possible to have a timeout in @step annotation or generally set timeout for scenario or story?

story.timeout.in.secs - is not an option, it is not behaving correctly

@mithuns
Copy link

mithuns commented Jan 29, 2018

Are you keeping this property
story.timeout.in.secs=300
In serenity.properties file at the root of your project ?

@wakaleo
Copy link
Member

wakaleo commented Jan 29, 2018

story.timeout.in.secs is a JBehave attribute that is not actually related to individual story timeouts - it puts an absolute time limit on your whole test run, and crashes out of the JVM if this timeout is exceeded.

@wakaleo
Copy link
Member

wakaleo commented Jan 29, 2018

Hard timeouts on tests or steps are generally not a great idea - they are a common cause of flaky tests and random test failures, unless you set them extremely high (in which case, what’s the point?). If you really need this feature in one of your steps , why not just code it yourself in Java?

@volnoboy
Copy link
Author

I keep everything in serenity.properties file. Look, we need this feature, I have already coded it myself. The solution with @step annotation would be much cleaner. For monitoring production in real time, this is very useful.

@wakaleo
Copy link
Member

wakaleo commented Feb 8, 2018

Happy to review a pull request.

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

No branches or pull requests

3 participants