-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
π documentationImprovements or additions to documentationImprovements or additions to documentation
Milestone
Description
π What did you see?
@BeforeAll in a Kotlin-based Cucumber suite did not work as expected, even though placed in a companion object and annotated @JvmStatic
β What did you expect to see?
I expected the @JvmStatic and @BeforeAll annotated method to be picked up by Cucumber without problems, as a before-all initializer method.
π¦ Which tool/library version are you using?
cucumber-java 7.20.1 kotlin 2.0.x
π¬ How could we reproduce it?
See screenhots: in Kotlin, write a suite or a test and have a beforeAll method. See the error appear.
Debug this and set a breakpoint in io.cucumber.java.MethodScanner::scan ; you'll see the beforeAll method is "seen" twice, once as a static final method (whish is OK) and once as a non-final method (in the companion object), which triggers the error.
π Any additional context?
No response
christianhujer and CraftyFella
Metadata
Metadata
Assignees
Labels
π documentationImprovements or additions to documentationImprovements or additions to documentation

