https://github.com/kh77/sb-testcontainer
Spring boot integration test with test container
https://github.com/kh77/sb-testcontainer
java mysql spring-boot3 testcontainers
Last synced: 3 months ago
JSON representation
Spring boot integration test with test container
- Host: GitHub
- URL: https://github.com/kh77/sb-testcontainer
- Owner: kh77
- Created: 2025-02-20T22:03:18.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-20T22:05:21.000Z (3 months ago)
- Last Synced: 2025-02-20T23:19:45.389Z (3 months ago)
- Topics: java, mysql, spring-boot3, testcontainers
- Language: Java
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Controller Test using 3 approach
* Integration Test by h2
* WebLayer Test by h2
* Test Container Test by MySQL# For Postgres Driver and Test container
PostgreSQL Driver:
org.postgresql
postgresql
runtime
Spring Boot Test Dependency:
org.springframework.boot
spring-boot-starter-test
test
Testcontainers for PostgreSQL:
org.springframework.boot
spring-boot-testcontainers
test
org.testcontainers
junit-jupiter
test
org.testcontainers
postgresql
test
Creating a Docker container with the latest version of PostgreSQL
@Container
@ServiceConnection
private static PostgreSQLContainer> postgreSQLContainer = new PostgreSQLContainer<>("postgres:latest");