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

Ability to name the hooks in Java #2917

Open
andytangclearme opened this issue Aug 24, 2024 · 1 comment
Open

Ability to name the hooks in Java #2917

andytangclearme opened this issue Aug 24, 2024 · 1 comment

Comments

@andytangclearme
Copy link

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

Previous closed issue: cucumber/messages#73

The issue is four years old and closed, but the java hook annotations still does not accept name as a property.

✨ What's your proposed solution?

Update the hook annotations (@Before, @After, etc.) to have name property:

@Before(name = "Take out the rubbish")
public void doSomething(){
    // Do something before each scenario
}

⛏ Have you considered any alternatives or workarounds?

No response

📚 Any additional context?

Intellij JUnit5 output:

image
@mpkorstanje mpkorstanje transferred this issue from cucumber/messages Aug 24, 2024
@mpkorstanje
Copy link
Contributor

mpkorstanje commented Aug 24, 2024

The issue is four years old and closed, but the java hook annotations still does not accept name as a property.

Would you be interested in providing a pull request?

If so please take note of #2798 (comment). The hook names can be emitted in messages and the html report should render them. But formatters that aren't messages based won't have access just yet.

Also note that the output in IDEA should include the hooks method name after #2881. You may want to update Cucumber.

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