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

Before/After Feature Hook Types? #260

Open
clrudolphi opened this issue Oct 27, 2024 · 3 comments
Open

Before/After Feature Hook Types? #260

clrudolphi opened this issue Oct 27, 2024 · 3 comments

Comments

@clrudolphi
Copy link
Contributor

🤔 What's the problem you're trying to solve?

I see in the recently merged and released #102 that an enumeration has been added that outlines the types of Hooks (Before/After TestRun, BeforeAfter TestCase, and Before/After TestStep).

The .NET implementations (Reqnroll and SpecFlow before it) also support hooks that surround Features.

✨ What's your proposed solution?

Would it be acceptable to add two additional HookType enumeration values to the list (BeforeFeature and AfterFeature)?

⛏ Have you considered any alternatives or workarounds?

No response

📚 Any additional context?

No response

@luke-hill
Copy link
Contributor

I personally wouldn't support this, as a feature is just a set of test cases. You shouldn't ideally be doing something around a feature. Plus the concept of tagging is in place for this - should you want to run something before only some subset of your tests.

If something is unique to specflow/reqnroll for this. It probably should live as something custom for it

@mpkorstanje
Copy link
Contributor

Would it be acceptable to add two additional HookType enumeration values to the list (BeforeFeature and AfterFeature)?

@clrudolphi would that not also require a message to indicate a feature started?

If something is unique to specflow/reqnroll for this. It probably should live as something custom for it

@luke-hill that's a tricky one.

I do think that feature hooks enable some really bad practices. But at the same time, for the ecosystem as a whole I'd rather see that we have a common messages format. The community would really benefit from the network effect it creates.

@clrudolphi
Copy link
Contributor Author

would that not also require a message to indicate a feature started?

Very likely, yes. There would be the need to associate which Feature the hook is related to (in a stream with multiple features execution intermixed).

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

3 participants