Part 16 · Capstone & Mock Interview

Reproducible build và fast feedback trước feature

Một lệnh phải dựng dependency, chạy migrations/tests và cho biết artifact/version; “works on my machine” là defect của developer experience.

Repository

Monorepo dễ atomic change cho capstone; modules order/payment/contracts/test-support/deploy/docs. Pin JDK/build tool/dependencies, wrapper và deterministic config hierarchy.

Test pyramid

Domain unit tests; repository/API slice; integration với PostgreSQL/broker thật qua Testcontainers; contract tests; ít end-to-end critical journeys. Test failure semantics, không chỉ status 200.

Local environment

Docker Compose cho infra, healthchecks và named volumes; app có thể chạy IDE ngoài container. Seed data explicit, migrations là source of truth, secrets dùng local-only mechanism.

CI baseline

Compile/static/unit song song, integration isolated, reports và immutable artifact. Cache là optimization; clean build phải luôn tái tạo được. README ghi prerequisites, one-command path và troubleshooting.

Spring Boot Testing · Testcontainers for Java