-
Notifications
You must be signed in to change notification settings - Fork 186
Open
Description
Objective
Increase DDF unit test coverage to 90%+ overall, with individual modules, functions, interfaces, classes, and branches at 80%+ minimum.
Current State
| Metric | Current | Target |
|---|---|---|
| Modules with tests | 269 (49%) | 500+ (90%) |
| Modules without tests | 279 (51%) | <50 (10%) |
| Coverage threshold | 75% | 90% |
| Branch coverage | 75% | 80% |
JaCoCo Configuration:
- Version: 0.8.12
- Current thresholds: 75% instruction, 75% branch, 75% complexity
- Halt on failure: enabled
Priority Modules Requiring Tests
Security Modules (HIGH PRIORITY)
Platform security is critical infrastructure. These modules need comprehensive coverage:
platform/security/filter/- Security filtersplatform/security/handler/- Authentication handlersplatform/security/interceptor/- CXF interceptorsplatform/security/pdp/- Policy Decision Pointplatform/security/realm/- Security realms
Catalog Core (HIGH PRIORITY)
Core catalog functionality:
catalog/core/catalog-core-standardframework/catalog/core/catalog-core-api-impl/catalog/plugin/- All catalog plugins
Integration & Federation (MEDIUM PRIORITY)
catalog/opensearch/catalog/spatial/- Federated source implementations
Implementation Plan
Phase 1: Infrastructure (Week 1)
- Update JaCoCo thresholds to 80% minimum
- Add coverage report aggregation
- Create CI coverage gate
Phase 2: Security Module Tests (Weeks 2-4)
- security-filter-* modules
- security-handler-* modules
- security-interceptor-* modules
- security-pdp-* modules
Phase 3: Catalog Core Tests (Weeks 5-7)
- catalog-core-* modules
- catalog-plugin-* modules
- catalog-transformer-* modules
Phase 4: Remaining Modules (Weeks 8-10)
- platform/* remaining
- libs/* modules
- distribution/* tests
Acceptance Criteria
- All modules with
src/main/javahave correspondingsrc/test/java - Overall project coverage ≥ 90%
- Individual module coverage ≥ 80%
- Branch coverage ≥ 80%
- CI enforces coverage gates
- No regressions in existing test suites
Technical Notes
Test Framework:
- JUnit 4/5 with Mockito
- Hamcrest matchers
- Pax Exam for OSGi integration tests
Coverage Configuration:
<jacoco.instruction.covered.ratio>0.90</jacoco.instruction.covered.ratio>
<jacoco.branch.covered.ratio>0.80</jacoco.branch.covered.ratio>Related Issues
- [SECURITY] Request: Upgrade Commons-Collections 3.2.2 to 4.4 #6936 - Commons-Collections upgrade (requires test updates)
- [SECURITY] Request: Upgrade Spring Framework 6.1.x to 6.2.x (EOL) #6935 - Spring Framework upgrade (requires test updates)
Metadata
Metadata
Assignees
Labels
No labels