Skip to content

Improve test coverage for de.rub.nds.crawler package #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 19, 2025

Summary

  • Add comprehensive unit tests for classes in de.rub.nds.crawler package
  • Improve overall test coverage from 19% to 32%
  • Achieve 97% coverage for de.rub.nds.crawler package (only CommonMain.java)

ic0ns added 6 commits June 19, 2025 11:05
- Add comprehensive tests for CommonMain covering all branches
- Add Mockito dependencies for mocking
- Create test resources (targets.txt and scanDefinition.json)
- Test both controller and worker command paths
- Test error cases for invalid commands
- Add comprehensive tests for CommonMain covering 94% of the class
- Add Mockito dependency for mocking external dependencies
- Create test resources (targets.txt and scanDefinition.json)
- Test both controller and worker command paths
- Test error cases for invalid and missing commands
- Improve overall package coverage from 0% to 94%
- Add comprehensive tests for CruxListProvider achieving 100% coverage
- Test various input scenarios including valid and invalid formats
- Test filtering of HTTPS vs HTTP entries and rank boundaries
- Improve targetlist package coverage from 10% to 27%
- Add comprehensive tests for DenylistFileProvider achieving 100% coverage
- Test domain, IP, and subnet denylist functionality
- Test handling of invalid entries and non-existent files
- Test thread safety with concurrent access
- Improve denylist package coverage from 0% to 100%
- Test construction with ScanJobDescription
- Test construction with invalid TO_BE_EXECUTED status
- Test fromException method with various error statuses
- Test ID getter and setter functionality
- Test all getters with populated data
- Achieve 100% coverage for ScanResult class
- Add test for CommonMain constructor
- Achieve 97% coverage for de.rub.nds.crawler package
- Note: Default case in switch is unreachable in normal operation
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.

1 participant