Skip to content

Add comprehensive test coverage improvements#142

Merged
slachiewicz merged 1 commit intocodehaus-plexus:masterfrom
slachiewicz:test-coverage
Apr 3, 2026
Merged

Add comprehensive test coverage improvements#142
slachiewicz merged 1 commit intocodehaus-plexus:masterfrom
slachiewicz:test-coverage

Conversation

@slachiewicz
Copy link
Copy Markdown
Member

Enhanced test coverage from 73% to 79% instruction coverage:

  • UrlUtils: 1→13 tests covering path normalization edge cases
  • Launcher: 7→20 tests covering getters/setters and argument handling
  • OsgiBundleStrategy: 3→19 tests covering loadClass, getResource, getResources
  • ParentFirstStrategy: 3→19 tests covering loadClass, getResource, getResources
  • Added JaCoCo plugin (0.8.12) for coverage reporting

Key improvements:

  • Test corner cases in UrlUtils.normalizeUrlPath()
  • Test null handling and edge cases in strategies
  • Test unconfigured Launcher scenarios
  • Test argument variations (null, empty, array)

Add comprehensive test coverage for exceptions, strategies, and integration scenarios

  • Add tests for all exception classes (ClassWorldException, DuplicateRealmException, NoSuchRealmException, ConfigurationException)
  • Add tests for all strategy implementations (SelfFirst, ParentFirst, OsgiBundle, StrategyFactory)
  • Add tests for ClassWorldListener notification mechanism
  • Add integration tests for edge cases and concurrency scenarios
  • Enhanced ClassWorldTest with 14 additional tests covering constructors, disposal, listeners, and realm management
  • Overall test count increased from 92 to 155 (+68%)

Enhanced test coverage from 73% to 79% instruction coverage:
- UrlUtils: 1→13 tests covering path normalization edge cases
- Launcher: 7→20 tests covering getters/setters and argument handling
- OsgiBundleStrategy: 3→19 tests covering loadClass, getResource, getResources
- ParentFirstStrategy: 3→19 tests covering loadClass, getResource, getResources
- Added JaCoCo plugin (0.8.12) for coverage reporting

Key improvements:
- Test corner cases in UrlUtils.normalizeUrlPath()
- Test null handling and edge cases in strategies
- Test unconfigured Launcher scenarios
- Test argument variations (null, empty, array)

Co-authored-by: Cerebras Agent <193945191+isaact-cerebras@users.noreply.github.com>

Add comprehensive test coverage for exceptions, strategies, and integration scenarios

- Add tests for all exception classes (ClassWorldException, DuplicateRealmException, NoSuchRealmException, ConfigurationException)
- Add tests for all strategy implementations (SelfFirst, ParentFirst, OsgiBundle, StrategyFactory)
- Add tests for ClassWorldListener notification mechanism
- Add integration tests for edge cases and concurrency scenarios
- Enhanced ClassWorldTest with 14 additional tests covering constructors, disposal, listeners, and realm management
- Overall test count increased from 92 to 155 (+68%)

Co-authored-by: Cerebras Agent <193945191+isaact-cerebras@users.noreply.github.com>
@slachiewicz slachiewicz merged commit 35d6836 into codehaus-plexus:master Apr 3, 2026
11 checks passed
@slachiewicz slachiewicz deleted the test-coverage branch April 4, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant