मुख्य सामग्री पर जाएँ
Skillpedia
टेस्टिंग33k · #8807

test-fixing

यह क्या करती है

यह स्किल आपके एजेंट को प्रोजेक्ट का टेस्ट सूट चलवाती है, फ़ेल होने वाले टेस्ट को मिलते-जुलते कारणों के समूह में बाँटती है, और सबसे बड़े समूह पहले ठीक करती है। यह उन डेवलपर्स के लिए है जिनके टेस्ट फ़ेल हो रहे हैं।

कब इस्तेमाल करें

  • ✓जब आपका टेस्ट सूट फ़ेल हो और आप चाहते हैं कि एजेंट समस्याएँ ढूँढकर ठीक करे।
  • ✓जब Continuous Integration जाँच टेस्ट की वजह से फ़ेल हो जाए।
  • ✓जब आप फ़ीचर पूरा करके मर्ज से पहले सारे टेस्ट पास देखना चाहते हैं।

Skill का लिंक

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/test-fixing/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/test-fixing/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“रीफ़ैक्टर के बाद मेरे टेस्ट फ़ेल होने लगे हैं। कृपया उन्हें ठीक कीजिए ताकि सूट पास हो जाए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट टेस्ट चलाता है, फ़ेल होने वाले टेस्ट को एरर के प्रकार, मॉड्यूल या मूल कारण के अनुसार समूहित करता है, फिर कोड पढ़कर छोटे और केंद्रित सुधार करता है, और हर समूह को दोबारा चलाकर पक्का करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Test Fixing

Systematically identify and fix all failing tests using smart grouping strategies.

When to Use

  • Explicitly asks to fix tests ("fix these tests", "make tests pass")
  • Reports test failures ("tests are failing", "test suite is broken")
  • Completes implementation and wants tests passing
  • Mentions CI/CD failures due to tests

Systematic Approach

1. Initial Test Run

Run make test to identify all failing tests.

Analyze output for:

  • Total number of failures
  • Error types and patterns
  • Affected modules/files

2. Smart Error Grouping

Group similar failures by:

  • Error type: ImportError, AttributeError, AssertionError, etc.
  • Module/file: Same file causing multiple test failure
  • Root cause: Missing dependencies, API changes, refactoring impacts

Prioritize groups by:

  • Number of affected tests (highest impact first)
  • Dependency order (fix infrastructure before functionality)

3. Systematic Fixing Process

For each group (starting with highest impact):

  1. Identify root cause

    • Read relevant code
    • Check recent changes with git diff
    • Understand the error pattern
  2. Implement fix

    • Use Edit tool for code changes
    • Follow project conventions (see CLAUDE.md)
    • Make minimal, focused changes
  3. Verify fix

    • Run subset of tests for this group
    • Use pytest markers or file patterns:
      uv run pytest tests/path/to/test_file.py -v
      uv run pytest -k "pattern" -v
      
    • Ensure group passes before moving on
  4. Move to next group

4. Fix Order Strategy

Infrastructure first:

  • Import errors
  • Missing dependencies
  • Configuration issues

Then API changes:

  • Function signature changes
  • Module reorganization
  • Renamed variables/functions

Finally, logic issues:

  • Assertion failures
  • Business logic bugs
  • Edge case handling

5. Final Verification

After all groups fixed:

  • Run complete test suite: make test
  • Verify no regressions
  • Check test coverage remains intact

Best Practices

  • Fix one group at a time
  • Run focused tests after each fix
  • Use git diff to understand recent changes
  • Look for patterns in failures
  • Don't move to next group until current passes
  • Keep changes minimal and focused

Example Workflow

User: "The tests are failing after my refactor"

  1. Run make test → 15 failures identified
  2. Group errors:
    • 8 ImportErrors (module renamed)
    • 5 AttributeErrors (function signature changed)
    • 2 AssertionErrors (logic bugs)
  3. Fix ImportErrors first → Run subset → Verify
  4. Fix AttributeErrors → Run subset → Verify
  5. Fix AssertionErrors → Run subset → Verify
  6. Run full suite → All pass ✓
अक्सर पूछे जाने वाले सवाल

क्या यह मेरे टेस्ट बदलती है या मेरा कोड?

कारण के हिसाब से यह दोनों बदल सकती है, और इसे न्यूनतम, केंद्रित बदलाव करने के लिए कहा गया है।

यह तय कैसे करती है कि पहले क्या ठीक करना है?

यह सबसे ज़्यादा टेस्ट प्रभावित करने वाले समूह से शुरू करती है, और फ़ीचर की समस्याओं से पहले साझा सेटअप की समस्याएँ ठीक करती है।

क्या इसके लिए कोई खास कमांड चाहिए?

यह make test से शुरू करती है, इसलिए यह तब सबसे अच्छा काम करती है जब आपके प्रोजेक्ट में वह कमांड हो।

जानकारी

लेखक का मूल विवरण

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.

repo: davila7/claude-code-templates

लोकप्रियता

GitHub स्टार
33k
रैंकिंग में स्थान
#8807
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

owasp-security

33k

आपके एजेंट को वेब ऐप, API, मोबाइल, कंटेनर और AI एजेंट्स के लिए OWASP सुरक्षा मार्गदर्शन सिखाती है, ताकि वह आम कमज़ोरियाँ पहचान सके और सुधार सुझा सके।

कोडिंगसिक्योरिटी

agent-management

33k

आपके एजेंट को AI Maestro कमांड-लाइन से AI एजेंट बनाने, सूची देखने, hibernate और wake करने, नाम बदलने और हटाने देती है, हर एजेंट के जीवन-चक्र को संभालते हुए।

AI और एजेंटएजेंट

agent-messaging

33k

Agent Messaging Protocol का उपयोग करके AI एजेंट्स के बीच हस्ताक्षरित संदेश भेजने, प्राप्त करने और उनका जवाब देने देती है, ज़्यादातर आपकी अपनी मशीन पर।

AI और एजेंटएजेंट

docs-search

33k

आपके एजेंट को फ़ंक्शन सिग्नेचर, क्लास परिभाषा और कमेंट के लिए ऑटो-जनरेटेड कोड डॉक्यूमेंटेशन खोजने देती है, ताकि कोड बदलने से पहले वह असली API जाँच सके।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills