Skip to content
New issue

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

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

Already on GitHub? # to your account

How can I execute code only once? #2312

Closed
agustingonzalez93 opened this issue Jun 10, 2021 · 1 comment
Closed

How can I execute code only once? #2312

agustingonzalez93 opened this issue Jun 10, 2021 · 1 comment

Comments

@agustingonzalez93
Copy link

For example, I have a feature with 40 scenarios. I want to execute a method only the first time before scenario 1. This should be like this every time I run the automation.

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Jun 10, 2021

A before hook and a static variable should do the trick.

See: #515

Better support will come with the next major version (release date very much on available time)

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

No branches or pull requests

2 participants