Skip to content

Testing

Generated Java applications should be testable from the first commit. Skills and examples should prefer small, deterministic tests over manual-only verification.

  • Include at least one automated test that fails if the primary endpoint regresses
  • Prefer ephemeral ports for embedded servers
  • Keep unit tests fast; use integration tests for HTTP and persistence boundaries
  • When adding databases, include Testcontainers or an equivalent strategy when practical
Framework Testing focus
Spring Boot @SpringBootTest, web slice tests, Testcontainers for persistence
Helidon HTTP tests against SE/MP endpoints and health checks
Jetty Start embedded server in tests; assert handler/servlet responses
Add integration tests that start the application on an ephemeral port
and verify the primary JSON endpoint and health check.
Add PostgreSQL persistence and Testcontainers to this Spring Boot project.
Keep tests hermetic and document required Docker availability.