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

SerenityParameterizedRunner.class shows as Deprecated under Java 21 #43

Open
ahmed-al-sadoon opened this issue Dec 4, 2024 · 3 comments

Comments

@ahmed-al-sadoon
Copy link

Hi there,
SerenityParameterizedRunner.class shows as Deprecated under Java 21. Is there any workaround you would suggest?

Best regards

@wakaleo
Copy link
Member

wakaleo commented Dec 4, 2024

JUnit 5 has excellent support for data-driven tests, I would recommend using that instead

@ahmed-al-sadoon
Copy link
Author

ahmed-al-sadoon commented Dec 4, 2024

Thanks for fast replaying.
With JUnit 5 we have unfortunately problems of passing test parameters to BeforeEach & AfterEach

@s-geri
Copy link

s-geri commented Dec 4, 2024

We've been running into the exact same issues after updating to Java 21. Methods annotated with JUnit 5's @ BeforeEach or @ AfterEach annotations cannot work with the test data (annotated with @ TestData under JUnit 4) as these are not injected into the member variables.

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

3 participants