Skip to content

chore: raise test coverage to 80 percent#215

Open
jlouvel wants to merge 1 commit intomainfrom
chore/increase-test-coverage-80
Open

chore: raise test coverage to 80 percent#215
jlouvel wants to merge 1 commit intomainfrom
chore/increase-test-coverage-80

Conversation

@jlouvel
Copy link
Copy Markdown
Contributor

@jlouvel jlouvel commented Apr 1, 2026

Related Issue

Closes #188


What does this PR do?

Increases JaCoCo test coverage from 67.47% to 80.01% (instruction-level) by adding targeted branch and edge-case tests across high-miss classes.

Approach: iteratively identified the classes with the most uncovered instructions via jacoco.csv, wrote focused tests for guard clauses, error paths, and fallback branches, verified each batch with the full suite, and repeated until the 80% threshold was crossed.

Coverage results

Metric Before After
Instruction 67.47% 80.01%
Line 68.87% 80.34%
Branch 54.31% 69.34%

Tests

New test classes (6):

  • OperationStepExecutorBranchTest — orchestration private/branch coverage
  • JettyStreamableHandlerTest — MCP HTTP transport POST/GET/DELETE behavior
  • ProtocolDispatcherCoverageTest — protocol error envelopes and edge cases
  • ResourceHandlerDynamicTest — dynamic resource execution and fallback mapping
  • InputParameterSerializerTest — input serializer nested/property branches
  • OutputParameterSerializerTest — output serializer mapping/value semantics

Expanded test classes (5):

  • ConverterTest — format guard clauses, JSONPath root selectors, maxLength edge cases
  • ResolverTest — resolver and mapping branch paths
  • OperationStepExecutorIntegrationTest — invalid call/mode paths
  • ResourceHandlerSafetyTest — static-resource safety and template edge cases
  • ResourceRestletTest — REST response/fallback behavior, forward-mode header propagation

Validation: mvn test --no-transfer-progress → 328 tests, 0 failures, 0 errors, 2 skipped, BUILD SUCCESS


Checklist

  • CI is green (build, tests, schema validation, security scans)
  • Rebased on latest main
  • Small and focused — one concern per PR
  • Commit messages follow Conventional Commits

Agent Context (optional)

agent_name: GitHub Copilot
llm: Claude Opus 4.6
tool: VS Code Copilot Chat
confidence: high
source_event: "Issue #188 — increase test coverage to 80%"
discovery_method: code_review
review_focus: src/test/java/io/naftiko/**

@jlouvel jlouvel requested a review from eskenazit April 1, 2026 20:50
@jlouvel jlouvel self-assigned this Apr 1, 2026
@jlouvel jlouvel force-pushed the chore/increase-test-coverage-80 branch from c737a9e to b2f1806 Compare April 2, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Framework : Increase test coverage to 80%

1 participant