0

I have a custom junit5 extension, that purpose is to do some clean up after each test class. I want it to be applied to all test classes in multi-module project automatically. Problem is when I enable "junit.jupiter.extensions.autodetection.enabled" auto-detection then extensions from 3rd party libraries like Mockk are applied too, which I have to avoid (it breaks bunch of our tests). Actually I want to call only unmockkAll() after test class execution. But later we going to add more clean up logic unrelated to mocking itself.

Is there a way to configure/hack it somehow without changing test classes itself?

I need that to work both with gradle and IDEA, though gradle is a must, IDEA is rather should.

1 Answer 1

1

junit.jupiter.extensions.autodetection.include will be a proper solution for that, tough it will be available in JUnit 5.12.0

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.