Hello,
As a new user of this quarkus extension, I expected to see only my scenarios as tests launched, but it seems that cucumber specific actions (starting/ending cucumber, before/after methods) are shown as separate tests also.
I may understand that's done in order to see each step separately, but this is causing the following issues when generating Junit surefire/failsafe reports:
The number of tests shown is not correct
Showing tests that are not really ones
In order to solve this issue, we my proceed as following:
Create beforeAll and afterAll methods that will be responsible for starting/ending cucumber (in order to declare them as non static, we may need to add the following annotation: @TestInstance(TestInstance.Lifecycle.PER_CLASS)
Include call to beforeFeature inside call of pickles (DynamicTests)
If you agree with this proposal, I can suggest a patch.
Hello, As a new user of this quarkus extension, I expected to see only my scenarios as tests launched, but it seems that cucumber specific actions (starting/ending cucumber, before/after methods) are shown as separate tests also.
After reading code in CucumberQuarkusTest, this behavior is due to creation of DynamicTests for start/end of cucumber, and beforeFeature) : https://github.com/quarkiverse/quarkus-cucumber/blob/d288e48a6dc974e4457c60ca3de2afd337500341/runtime/src/main/java/io/quarkiverse/cucumber/CucumberQuarkusTest.java#L122 https://github.com/quarkiverse/quarkus-cucumber/blob/d288e48a6dc974e4457c60ca3de2afd337500341/runtime/src/main/java/io/quarkiverse/cucumber/CucumberQuarkusTest.java#L128 https://github.com/quarkiverse/quarkus-cucumber/blob/d288e48a6dc974e4457c60ca3de2afd337500341/runtime/src/main/java/io/quarkiverse/cucumber/CucumberQuarkusTest.java#L166
I may understand that's done in order to see each step separately, but this is causing the following issues when generating Junit surefire/failsafe reports:
In order to solve this issue, we my proceed as following:
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
If you agree with this proposal, I can suggest a patch.
Thank you