This repository is created for education reason.
The technology stack: Java 17, Groovy, Gradle, JUnit 5.9.3, Spock 2.3, Kotlin 1.8.21, kotest 5.6.2, mockito-kotlin, mockk Static code analyzers (codenarc, detekt, ktlint)
It contains examples of using new features from JUnit 5 vs Spock features. It is possible to find the following examples of comparison:
- Assertions: Spock power assertions vs kotest assertions
- Exception verifications
- Test life cycles: instance per method, instance per class, order of calling methods
- Parametrized tests
- Asynchronous verifications: timeout assertions, awaitility framework, async conditions in Spock and kotest
- Repeated tests
- Condition executions: IgnoreIf, Requires, assumptions
- Using of mocks: Spock mocks vs mockk mocks vs mockito mocks