Supersonic Subatomic Mocking: How to test your Quarkus app
summary
Shows concrete test patterns for a Quarkus + Kotlin app: unit tests with MockK for service logic, then promoted to QuarkusTest when a Quarkus cache annotation must be exercised so CDI uses the mock; reveals a Kotlin/JUnit5 gotcha requiring a static BeforeAll (companion object + @JvmStatic). Uses MockK and the Quarkus MockK JUnit5 extension to auto-inject mocks. Demonstrates failing then fixed tests, reports startup timing (demo run ~8s vs expected ~1s), and notes the extension is v0.2.0 with few contributors but functional.
AI-written summary · about
chapters (10)
- 0:00Start
- 1:07What is this session about?
- 2:32Disclaimer
- 3:18Excursus: Resource efficiency
- 8:53JUnit 5
- 9:56MockK
- 11:16Scenario
- 40:05Quarkus - Drawbacks
- 41:16Promising Extension
- 41:30Further information
related talks
26mStreamlining Cloud-Native Development: Simplifying Dependencies and Testing with Microcks
46mQuarkus why, how and what
34mWrite tests that spark flow
56mWrite Tests That Spark Flow
44mQuarkus: Supersonic, Subatomic Full-Stack Development
30mTest-Driven Development: It's easier than you think!
37mQuarkus in Action…in Action!
52mQuarkus Supersonic Subatomic Java
