Add JUnit5 and Kotest for plugin tests #400
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does a few things to allow using the JUnit5 test runner, and the JUnit5 and Kotest test frameworks.
JUnit 5
tests { useJUnitPlatform() }
command to tell gradle to run tests using the JUnit5 runner (c.f. JUnit5 architecture)testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
dependency to enable the JUnit5 runner to discover and run legacy (JUnit3/4) tests.Kotest
testImplementation("io.kotest:kotest-runner-junit5-jvm:$kotestVersion")
andtestImplementation("io.kotest:kotest-property-jvm:$kotestVersion")
dependencies to use the Kotest framework, for 1) PBT 2) nice syntax 3) nicer assertions on collections. See https://kotest.ioTest loggging
testLogging { events = setOf(TestLogEvent.FAILED, TestLogEvent.PASSED, TestLogEvent.SKIPPED) }
line to have feedback on passing/failing tests when running via gradle command-line (vs IntelliJ runner).