- replace legacy mockito-all with mockito-junit-jupiter - add tests for AppState, MQTT service, process manager, and animation file service - rewrite service tests for stronger edge-case coverage - refactor services for testability (MQTT client/process launcher/output path injection) - fix duplicate payload ID handling in BinaryEventService - update README and docs testing/source-map sections
44 lines
1.2 KiB
Markdown
44 lines
1.2 KiB
Markdown
# Testing
|
|
|
|
## Run Tests
|
|
|
|
```powershell
|
|
mvn test
|
|
```
|
|
|
|
## Current Test Suite
|
|
|
|
Located in:
|
|
|
|
- `src/test/java/vassistent/model/AppStateTest`
|
|
- `src/test/java/vassistent/service/AnimationFileServiceTest`
|
|
- `src/test/java/vassistent/service/BinaryEventServiceTest`
|
|
- `src/test/java/vassistent/service/DataPersistenceServiceTest`
|
|
- `src/test/java/vassistent/service/EvaluationServiceTest`
|
|
- `src/test/java/vassistent/service/MqttClientServiceTest`
|
|
- `src/test/java/vassistent/service/ProcessManagerServiceTest`
|
|
- `src/test/java/vassistent/service/StatisticsServiceTest`
|
|
|
|
Coverage focus:
|
|
|
|
- state change notifications
|
|
- payload validation and processing flow
|
|
- level evaluation thresholds
|
|
- MQTT lifecycle and topic routing
|
|
- process launch/shutdown command sequencing
|
|
- animation file output mapping
|
|
- SQLite persistence behavior
|
|
- rolling averages and ratio calculations
|
|
|
|
## Current Status (Java 17)
|
|
|
|
- full suite passes with `mvn test`
|
|
- test stack:
|
|
- `org.junit.jupiter:junit-jupiter`
|
|
- `org.mockito:mockito-junit-jupiter`
|
|
|
|
## Notes
|
|
|
|
- some tests are integration-style and use temporary SQLite databases
|
|
- test output may include logger lines because services log during execution
|