-
Notifications
You must be signed in to change notification settings - Fork 53
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
Testing: Cleanup Test resets #271
Comments
What if each class could register itself as "resettable". Then the rule would automatically iterate across every resettable object, between each test case. Then all a Dev would need to do is call the single JUnitRule, and not worry about the details of what's being reset. |
Is there any way to have JUnit/Gradle run each test in a separate process? Is that a thing? When I've come across issues like this in other languages, either with static state or with import-time issues in dynamic languages, I've solved it by using a test runner that has the option of running each test in a completely new process/interpreter... |
JUnit 5 has replaced |
Solution:
|
reset()
method, so that as we run unit tests, state modifications from one test don't unintentionally impact another testThe text was updated successfully, but these errors were encountered: