How to modify content of "Set up" and "Tear down" within the Execution (Suites) #2665
-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
The final result should look like the picture below. |
Beta Was this translation helpful? Give feedback.
-
At the moment, that's the temporary solution (not really user friendly): |
Beta Was this translation helpful? Give feedback.
-
By default, cucumber doesn't provide a way to change hook names. It's already introduced in the latest version of the cucumber protocol, but it is not yet available for Java. See cucumber/messages#73 As the solution, you can update the hook names using Allure Runtime API: @Before("@hooks")
public void before() {
Allure.getLifecycle().updateFixture(hook -> hook.setName("Human readable before name"));
// do something
} PS: Make sure you're using the latest version of |
Beta Was this translation helpful? Give feedback.
-
Hello @dariuszkanicki I have created project with Playwright cucumber using javascript with allure integration. I have added hooks but not adding those hooks to the allure report. I have looked at your allure report and it is very promising . Could you please provide a sample repo that includes every file for the setup ? I would really appreciate it if you can help me. |
Beta Was this translation helpful? Give feedback.
By default, cucumber doesn't provide a way to change hook names. It's already introduced in the latest version of the cucumber protocol, but it is not yet available for Java. See cucumber/messages#73
As the solution, you can update the hook names using Allure Runtime API:
PS: Make sure you're using the latest version of
allure-cucumber7-jvm
(2.29.0
as of today) since I remember fixes were recently made for this particular use case.