Langsung ke konten
Skillpedia
Testing48k Β· #5969

test-fixing

Fungsinya

Alat ini membantu menemukan dan memperbaiki error pada tes kode yang gagal. Alat ini mengelompokkan error berdasarkan jenis dan penyebabnya agar bisa diperbaiki secara sistematis.

Kapan dipakai

  • βœ“Saat tes kode Anda gagal.
  • βœ“Setelah membuat perubahan pada kode dan tes sudah tidak lolos lagi.
  • βœ“Saat Anda perlu memastikan semua tes proyek berjalan dengan benar.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/test-fixing/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/test-fixing/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œTes saya gagal setelah saya memperbarui kode, bisakah Anda memperbaikinya?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Pertama, alat ini menjalankan semua tes untuk melihat mana yang gagal. Lalu, alat ini mengelompokkan error yang serupa dan memperbaiki satu kelompok sekaligus, sambil memeriksa apakah semuanya sudah berjalan lagi sebelum beralih ke kelompok berikutnya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 βœ“

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Pertanyaan umum

Apa arti 'failing tests'?

Artinya, kode yang memeriksa apakah program Anda berjalan dengan benar menemukan masalah dan tidak bisa memastikan bahwa semuanya sudah benar.

Mengapa error dikelompokkan?

Pengelompokan membantu memperbaiki banyak masalah sekaligus jika memiliki penyebab yang sama, sehingga prosesnya lebih cepat dan teratur.

Apa itu 'infrastructure first'?

Artinya, error yang berkaitan dengan hal dasar, seperti dependency yang hilang atau masalah konfigurasi, harus diperbaiki terlebih dahulu sebelum error pada logika program.

Detail

Deskripsi asli dari pembuat

Systematically identify and fix all failing tests using smart grouping strategies. Use when explicitly asks to fix tests (\"fix these tests\", \"make tests pass\"), reports test failures (\"tests are failing\", \"test suite is broken\"), or completes implementation and wants tests passing.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#5969
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa