Integrate with testing frameworks
bsideup opened this issue · comments
To simplify the setup process, we could provide integration with testing frameworks like JUnit and configure it automatically, e.g. with https://junit.org/junit4/javadoc/4.12/org/junit/runner/notification/RunListener.html
Any plan to support JUnit 5 https://junit.org/junit5/docs/current/user-guide/#extensions-overview
I think JUnit 5 extension model easy.
@linux-china we had a discussion with @sbrannen about a global extension with the SPI, I'm considering adding it but it means that the users will have to set a system property to make it work and it is a bit wonky (not setting it may produce false positives)
Well, if you literally just want to execute some code (that doesn't need to interact directly with the Jupiter extension model), you could implement a JUnit Platform TestExecutionListener
which can be registered automatically without the user having to set a configuration parameter (or system property). Details on that can be found here.
@sbrannen wow, thanks a lot! Exactly what we need :)
You're welcome!
Glad to be of service, and... sorry I didn't mention the TestExecutionListener
option earlier. For some reason I thought you wanted to integrate with Jupiter's extension model.