
How to Use Quarkus Dev Mode and Continuous Testing
Use Quarkus dev mode for live reload, the keyboard commands and continuous testing that reruns tests when you save, and know what dev mode cannot reload.
Tag
223 posts

Use Quarkus dev mode for live reload, the keyboard commands and continuous testing that reruns tests when you save, and know what dev mode cannot reload.

Let Quarkus start a PostgreSQL, Kafka or Redis container in dev mode and tests when no connection is configured, and learn how to pin images and turn it off.

Use assertThrows to check the exception type and message, and assertAll to see every failure at once, with the mistakes that make both pass by accident.

Write assertions that say what they check and fail with a message you can act on, using JUnit 5 assertions and AssertJ's fluent style together.

Split fast and slow tests with JUnit Tag annotations, then select them in Maven Surefire and Failsafe or Gradle with tag expressions for CI stages.

Use Spring Boot test slices properly: WebMvcTest, DataJpaTest, JsonTest and RestClientTest load only part of the context, with mocks, imports and speed gains.

Detect N plus 1 queries in Java tests: count statements with Hibernate statistics or datasource-proxy and fail the build when a budget is exceeded.

Understand Spring test context caching: what the cache key contains, how to see hits and misses, limit the cache size and design tests to share contexts.

Understand which Maven plugin runs which tests: Surefire for unit tests, Failsafe for integration tests, naming patterns, lifecycle phases and common fixes.

Use Vaadin Hilla to build a React front end over Java endpoints with generated TypeScript clients, file based routing, authentication and when to choose Flow.

Wire a Vaadin application into Spring Boot so views get services by constructor injection, with the right scopes, security and a production build.

Define routes with annotations, wrap them in a shared layout with a side menu, pass URL parameters and guard views before they open.