We just ported our unit tests to JUnit5. Realizing that this is still rather early adoption with little hints on google.
The most challenging was to get jacoco code cove
To get a reference to the junitPlatformTest
task, another option is to implement an afterEvaluate
block in the project like this:
afterEvaluate {
def junitPlatformTestTask = tasks.getByName('junitPlatformTest')
// do something with the junitPlatformTestTask
}
See my comments on GitHub for JUnit 5 for further examples.