tool-suite-X icon indicating copy to clipboard operation
tool-suite-X copied to clipboard

Improve ODK-X Services Test Coverage:Write Tests for logging class in the Application package

Open Agaba-derrick opened this issue 1 year ago • 0 comments

This issue involves adding unit tests for the WebLoggerImpl and WebLoggerAppNameUnknownImpl classes in the org.opendatakit.logging package. The tests should validate logging functionality and file handling,

Tests to Cover:

  • Logging Methods:
  • Verify that all logging methods (a, t, v, d, i, w, e, s) call the log() method correctly.
  • Log File Handling:
  • Test the close() method to ensure it behaves correctly when the log file is open or when the logging directory does not exist.
  • Stale File Scanning:
  • Confirm that staleFileScan() correctly deletes stale log files older than 30 days and handles directory issues.
  • Log Level Management:
  • Test setMinimumSystemLogLevel() and getMinimumSystemLogLevel() for correct behavior and remapping of SUCCESS and TIP.
  • Exception Logging:
  • Validate that printStackTrace() logs exceptions and formats them correctly. #507

Agaba-derrick avatar Oct 19 '24 22:10 Agaba-derrick