Skip to content

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

@Agaba-derrick

Description

@Agaba-derrick

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.
    Write Unit Test for Uncovered Classes in ODK-X AndroidLibrary #507

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions