-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Invoke @BeforeAll method for a dry run #2989
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
Comments
Could you clarify what you mean by dynamic filtering? I don't believe you that this is currently possible at all. |
Calculating the filtering expression at runtime. At least it works with tags.
But in case the dry run property is set to true, for example, in the Gradle task, this will not work, because the @BeforeAll method will not be invoked. |
As you are using Gradle, and presumably the JUnit Platform, have you considered using the JUnit 5 tag expressions (slightly different from Cucumbers) and calculating these in Gradle? |
🤔 What's the problem you're trying to solve?
Currently, if the dry run property is set to true outside a method annotated with @BeforeAll, this method is not invoked.
Therefore, there is no possibility to dynamically filter scenarios in the code.
A dry run without filtering does not take much time, but it affects the overall statistics of automated tests, since third-party libraries cannot distinguish the result of a normal run from a dry one.
✨ What's your proposed solution?
Add a configuration property to enable/disable the @BeforeAll (and @ AfterAll ?) method invocation.
⛏ Have you considered any alternatives or workarounds?
For now we can set the dry run property to true in the @BeforeAll method and it will be invoked.
📚 Any additional context?
No response
The text was updated successfully, but these errors were encountered: