-
Notifications
You must be signed in to change notification settings - Fork 0
Testing and Quality
stdOWL edited this page Jun 22, 2026
·
1 revision
./gradlew testTests use JUnit 5, MockK, and WebTestClient, plus a Testcontainers-backed Redis test for the distributed rate limiter (needs Docker). A JaCoCo coverage report is written to build/reports/jacoco/test/html/index.html.
- Services (MockK): auth, customers, rate limiter.
-
Full HTTP flows (WebTestClient): login,
/api/me, customer CRUD + search/pagination/sort, the role matrix (a pass and a 403 per protected endpoint), validation (400), duplicate email (409), the audit trail, CORS, and password change. - Distributed limiter: per-IP isolation and 429 against real Redis (Testcontainers).
The suite runs with JWT_SECRET injected and rate limiting disabled by default, and runs on every push in CI (see CI CD Pipeline).
The postman/ collection covers the Auth / User / Admin / Customers / Docs areas with assertions, including negative cases (e.g. an invalid email → 400). Run it headless from the repo root:
npx newman run postman/customer-management.postman_collection.json \
-e postman/customer-management-local.postman_environment.jsonA green run reports 0 failures across all requests and assertions. See postman/README.md for the full guide.
Getting started
How it works
Operations
Reference