-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cucumber JUnit5 should support @BeforeAll, @AfterAll. Cucumber JUnit4 currently supports @BeforeClass, @AfterClass #2226
Comments
Worth noting that unlike previous versions of JUnit, JUnit 5 consists of Jupiter, Vintage and the JUnit Platform. Jupiter and Vintage are like Cucumber test engines in the JUnit Platform. As such it is not possible to reuse features from Jupiter in Cucumber. So ultimately this is a duplicate of #515 and that will be a while because it requires a pretty big rewrite of Cucumber. |
@mpkorstanje thanks for the quick reply. What about supporting ExtendsWith:
is this still the same amount of effort? |
The extension model is also part of Jupiter and not really reusable. It is strongly tied to the assumption that there is exactly one instance of the class under test and that each test is a single method. Cucumber uses multiple classes with multiple methods in a single test. |
FYI for anyone interested I have created an example using the global hook example in https://github.com/davidmelia/cucumber-junit5/blob/main/src/test/java/com/melia/CucumberJunit5GlobalHookTest.java |
The |
Hi,
I have a project showing the issue https://github.com/davidmelia/cucumber-junit5
Currently Cucumber JUnit 4 supports @BeforeClass/ @afterclass which is invaluable for starting embedded databases,etc
I am migrating to Cucumber JUnit5 and notice it doesn't support this:
Further to this I cannot get around this by providing a custom extension
as the extension does not fire.
Could @BeforeAll, @afterall please be supported as migrating will be extremely difficult if not impossible.
Thanks
The text was updated successfully, but these errors were encountered: