Testing in this project is designed to catch regressions in plugin lifecycle behavior while keeping contributor workflow practical.
Tests are organized under src/test/java and generally mirror production package boundaries:
- command tests for command parsing and handler behavior;
- manager tests for lifecycle sequencing and edge cases;
- utility/entity tests for deterministic supporting logic.
Run tests:
./gradlew testRun full quality checks:
./gradlew checkRun lint checks:
./gradlew checkstyleMain checkstyleTestGenerate local coverage report:
./gradlew test jacocoTestReportWhen changing behavior, add or update tests close to that behavior:
- command changes: argument parsing, permission-sensitive execution paths, and user-visible outputs;
- lifecycle changes: dependency checks, load/unload ordering, and error propagation;
- watcher changes: file-event handling, debounce behavior, and recovery after deleted/recreated jars.
Focus on user-visible and regression-prone behavior.
Use these rules when adding or reviewing tests:
- prefer behavior assertions over "does not throw" assertions;
- validate happy path and failure path for lifecycle-sensitive changes;
- avoid static mocking when regular dependency boundaries are available;
- assert observable outcomes (results, side effects, emitted messages, interactions).
After jacocoTestReport:
- HTML report:
build/reports/jacoco/test/html/index.html - XML report:
build/reports/jacoco/test/jacocoTestReport.xml
CI validates Checkstyle, tests, and coverage report generation on pull requests and main branch updates.