Testing in this project is designed to catch regressions early while keeping contributor workflow practical.
Tests live in each Maven module under src/test/java and mirror production package boundaries:
- API tests for public contracts and utility behavior
- framework tests for lifecycle, config, command, and loader logic
- feature tests for feature-specific logic and edge cases
Shared filesystem and proxy helpers live in serverfeatures-testkit; module-specific helpers remain next to their
tests.
Run tests:
./mvnw -q testRun the full quality gate:
./mvnw -B -ntp verifyThe full gate treats actionable compiler warnings (including deprecations) as errors, rejects undeclared/unused dependencies, and inspects the final shaded jar for required runtimes, relocation leaks, and accidentally bundled platform plugins.
Run lint checks:
./mvnw -B -ntp -DskipTests checkstyle:checkWhen you change behavior, add or update tests near that behavior:
- feature changes: user-visible logic, edge cases, fallback behavior
- framework changes: lifecycle and dependency-resolution contracts
- API changes: conversion, fallback, error handling, and stability guarantees
Focus on regression-prone logic paths (branching rules, validation, parsing, state transitions).
Use these rules during authoring and review:
- prefer behavior assertions over "does not throw" smoke checks;
- avoid tests that only mirror declaration state (pure enum/constant checks);
- avoid pure getter/setter round-trip tests unless they protect a real invariant;
- assert observable outcomes for both happy and failure paths.
Use this when doing a full feature/class/method scan:
- Run
./mvnw -B -ntp verify. - Review each module's
target/site/jacoco/index.htmland sort by missed lines/branches. - Use module-level
jacoco.csvfiles to find high-risk classes with high missed lines and branches. - Add tests for behavior-heavy methods first.
Prioritize methods with both high line miss and high branch count.
Coverage gates are enforced per module so API regressions cannot hide inside the much larger Paper bundle. The current floors are explicit Maven properties and should only move upward as coverage improves.
CI runs:
- Checkstyle (
ci-lint.yml) - Tests and coverage (
ci-tests-and-coverage.yml) - Bundled Paper acceptance with DataProvider, DataRegistry, MySQL, and local-PDC AutoPickup startup
Tag pushes (v*) trigger release packaging and publication (release-package.yml).