Fix Test errors

Failures in automated test lifecycle management, test execution tracking, and test maintenance workflows.

Common error signatures

Where errors originate

Most failures occur during:

How to diagnose

  1. Check file paths first. Many errors stem from missing test files, moved source files, or incorrect project root configuration. Verify that project_root in TestMaintenanceWorkflow and TestLifecycleManager points to the correct directory.

  2. Examine the task queue. If TestLifecycleManager operations fail, call get_queue() to inspect pending tasks. Look for tasks with invalid file_path values or corrupted metadata fields.

  3. Validate coverage files. When track_coverage() fails, check that the coverage.xml file exists and contains valid XML. The file must include <coverage> root elements with measurable line and branch data.

  4. Test file mapping issues. If test lifecycle events fail, verify that the ProjectIndex can correctly map source files to test files. Missing or outdated index data causes most file-based operations to fail.

  5. Check priority and action values. TestPlanItem and TestTask objects require valid TestAction and TestPriority enum values. Invalid enums cause filtering and processing methods to raise AttributeError or KeyError.

Source files

Tags: tests, debugging, fixes