Skip to content

Expand Test Coverage for New Runtime and Reporting Modules #52

@coderabbitai

Description

@coderabbitai

Overview

The major design changes in PR #48 introduced new runtime and reporting modules that need comprehensive test coverage.

Missing Test Coverage

1. Runtime Module Tests

  • mcp_fuzzer/fuzz_engine/runtime/manager.py - ProcessManager class
  • mcp_fuzzer/fuzz_engine/runtime/watchdog.py - ProcessWatchdog class
  • mcp_fuzzer/fuzz_engine/runtime/wrapper.py - AsyncProcessWrapper and AsyncProcessGroup

2. Reporting System Tests

  • mcp_fuzzer/reports/reporter.py - FuzzerReporter class
  • mcp_fuzzer/reports/formatters.py - ConsoleFormatter, JSONFormatter, TextFormatter
  • mcp_fuzzer/reports/safety_reporter.py - SafetyReporter class

3. Integration Tests

  • End-to-end testing of watchdog + process management
  • Reporter integration with safety system
  • CLI argument handling for new reporting options
  • Cross-platform process management (Windows/Unix)

4. Edge Case Testing

  • Process hanging scenarios and watchdog intervention
  • Resource exhaustion during fuzzing
  • Signal handling across platforms
  • Malformed report data handling

Acceptance Criteria

  • Add unit tests for ProcessManager with >90% coverage
  • Add unit tests for ProcessWatchdog including timeout scenarios
  • Add tests for AsyncProcessWrapper and AsyncProcessGroup
  • Add comprehensive tests for all reporter classes
  • Add integration tests for runtime + reporting
  • Add cross-platform testing for process management
  • Add performance/stress tests for long-running scenarios

Related

  • PR Major design change #48: Major design change
  • Current test files: tests/test_client.py, tests/test_system_blocker.py

Requested by: @Agent-Hellboy
PR Context: #48

Metadata

Metadata

Assignees

No one assigned

    Labels

    codecovtestingcode changes inside unittest or other form of testing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions