test-fixing

Run tests and systematically fix all failing tests using smart error grouping. Use when user asks to fix failing tests, mentions test failures, runs test suite and failures occur, or requests to make tests pass.

Author

Install

Hot:2

Download and extract to your skills directory

Copy command and send to OpenClaw for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=sickn33-skills-test-fixing&locale=en&source=copy

Test Fixing - Intelligent Test Repair Assistant

Skill Overview

Test Fixing is a systematic intelligent tool for repairing failing tests. By using error grouping strategies and priority sorting, it helps developers efficiently handle large numbers of failing tests within a test suite.

Applicable Scenarios

  • Fixing tests after refactoring: After code refactoring causes many tests to fail, quickly locate and categorize the issues for repair

  • CI/CD pipeline failures: When continuous integration is interrupted due to test failures, systematically investigate and fix the issues

  • New feature test validation: After feature development is complete, ensure all related tests pass before merging the code
  • Core Features

    1. Intelligent Error Grouping

    Automatically analyze test failure output and group failures along three dimensions:

  • Error type: ImportError, AttributeError, AssertionError, etc.

  • Impacted modules: Identify multiple failures caused by the same file

  • Root cause: Distinguish missing dependencies, API changes, logic errors, and more
  • The system prioritizes groups based on impact scope and dependency relationships, ensuring that infrastructure issues are fixed first before handling functional logic.

    2. Systematic Repair Workflow

    Provide structured repair steps for each error group:

  • Run the full test suite to identify all failures

  • Analyze and group similar errors

  • Repair group by group in priority order

  • After repairing each group, run a subset to verify

  • Once everything is complete, run the full suite to confirm
  • This iterative “repair-verify” approach ensures problems are thoroughly resolved without omissions or the introduction of new issues.

    3. Repair Order Strategy

    Includes a scientifically designed repair order:

  • Infrastructure first: Resolve import errors, missing dependencies, configuration issues

  • API changes next: Handle function signature changes, module restructuring, renaming

  • Logic issues last: Handle assertion failures and business logic defects
  • This order prevents wasting time debugging logic errors before infrastructure issues are resolved.

    Common Questions

    Can Test Fixing handle all types of test errors?

    Test Fixing focuses on systematically addressing common test failure patterns, including import errors, attribute errors, assertion failures, and more. For complex business logic issues or environment-related problems, it provides diagnostic support, but the specific repair still requires developer involvement.

    Why is the repair order important?

    An incorrect repair order leads to duplicated work and frustration. For example, if you fix logic errors first but there is still an import issue, the repaired code cannot run to be validated. The correct approach is to make sure the code can run first (fix imports and dependencies), then ensure interfaces are correct (API changes), and finally address business logic.

    Do I need to modify existing tests when using Test Fixing?

    No. Test Fixing is designed to integrate seamlessly with existing test workflows, supporting popular test frameworks such as pytest and unittest. It uses standard test execution commands (e.g., make test) and subset test commands (e.g., pytest -k "pattern"), without requiring changes to the test code or project structure.