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

Serenity Cucumber global hook option #1681

Closed
vaibhav2701 opened this issue May 20, 2019 · 2 comments
Closed

Serenity Cucumber global hook option #1681

vaibhav2701 opened this issue May 20, 2019 · 2 comments
Labels

Comments

@vaibhav2701
Copy link

Hi,

We have setup a new BDD project with serenity + cucumber combination and are in the process of figuring things out. One of our requirements is to have a data setup mechanism which will run before any feature is executed. So basically first data setup will run and then all feature files. The data setup is common for all feature files so needs to be run just once.

In jbehave+ serenity combo we used to have @BeforeStories. Can't see it in cucumber. What are our options to achieve this? Any help would be appreciated. Thanks.

@wakaleo
Copy link
Member

wakaleo commented May 20, 2019

Cucumber doesn't have a BeforeStories equivalent. I would usually just use a synchronised lazy loading mechanism in a @before method.

@vaibhav2701
Copy link
Author

synchronized lazy loading? Can you give an example or point to one if its not too much to ask for :)

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants