1.8 KiB
1.8 KiB
description, paths
| description | paths | |||
|---|---|---|---|---|
| Testing and verification rules for HealthLink-HIS |
|
Testing and Verification Rules
Iron Law 1: Test after modification
- Backend:
mvn clean compile -DskipTests→mvn install -DskipTests→mvn test - Frontend:
npm run build:dev→npm run lint→npm run test:run - White box: Compilation passes, no ERROR
- Black box: Key interfaces return
{code:200, data:...}, verify business logic - Smoke: Application starts normally, core flow works
Iron Law 3: Commit only after tests pass
- Compilation + all tests must pass before
git commit - Do not commit incomplete features, debug code, or temporary files
Iron Law 8: Verification before completion
- Cannot claim "done", "passed", "no problem" without running verification commands
- Forbidden: "should work", "probably fine", "looks correct"
- Required: Run command → Read output → Confirm result → Then claim
- This is an honesty principle, not an efficiency issue
Iron Law 19: Compile errors are not distinguished by source
mvn compile,vite build,vue-tscerrors = not acceptable, regardless of origin- Forbidden: "this is a pre-existing issue", "not my change", "original bug"
- Correct approach: Locate error → Fix → Rebuild to confirm → Then continue
Full verification pipeline
Use /verify skill to run the complete verification suite:
- Backend: compile + build + test
- Frontend: build + lint + test
Test frameworks
- Backend: JUnit + Spring Boot Test
- Frontend: Vitest (unit), Playwright (E2E)
Running specific tests
# Backend single test class
mvn test -pl healthlink-his-application -Dtest="XxxTest" -Dsurefire.failIfNoSpecifiedTests=false
# Frontend single test file
npm run test:run -- path/to/test.spec.ts