Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

test-maintenance

/test-maintenance

Refaktoryzuje kod testów z taką samą starannością jak produkcyjny: wydziela helpery, usuwa duplikację i kasuje testy, które nie zasługują na miejsce, gdy zestaw jest wolny w zmianie i pełen testów bez zaufania.

Repozytorium
AI-SKILLS ↗
Licencja
MIT
Ostatnia zmiana repozytorium
05.09.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 05.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Refaktoryzuje kod testów z taką samą starannością jak produkcyjny: wydziela helpery, usuwa duplikację i kasuje testy, które nie zasługują na miejsce, gdy zestaw jest wolny w zmianie i pełen testów bez zaufania.

Oryginalny opis (EN)

Refactor test code with the same care as production: extract helpers, remove duplication, and delete tests that no longer earn their place. Use when the test suite has become slow to change, repetitive, or full of tests nobody trusts.

Jak działa

  1. Method
  2. Signals
  3. Boundaries
Sekcje z nagłówków SKILL.md, w oryginale · 57 linii, 457 słów
Podgląd SKILL.md
---
name: test-maintenance
description: "Refactor test code with the same care as production: extract helpers, remove duplication, and delete tests that no longer earn their place. Use when the test suite has become slow to change, repetitive, or full of tests nobody trusts."
---

# Test maintenance

Test code is production code with a longer memory: it outlives features and
gets read far more than it is written. Left untended it accretes copy-pasted
setup, tests that assert nothing, and duplicates that all break together on one
change. Maintaining it means the same moves you make in application code, plus
one nerve most people lack: deleting a test that has stopped paying for its
runtime.

## Method

1. **Extract setup into named builders, not shared mutable state.** Replace
   repeated arrange blocks with a factory or builder
   (`makeUser({suspended: true})`) that returns fresh objects. Avoid a shared
   `setUp` that mutates instance fields across tests, which couples them and
   breeds order-dependent flakiness.
2. **Dedupe the assertion, keep the intent visible.** Pull a repeated
   multi-line check into a custom matcher or a helper
   (`assertValidInvoice(inv)`), but leave the input and the expected outcome in
   the test body. A test whose meaning now lives entirely in a helper is
   unreadable at the call site.
3. **Delete tests that no longer earn their runtime.** Remove tests that assert
   a deleted feature, duplicate another test's coverage exactly, or only
   restate the implementation. Confirm the deletion is safe with a coverage or
   mutation run: if killing the test does not drop either number, it was not
   pulling weight.
4. **Fix or quarantine flaky tests on sight, never retry blindly.** A test that
   fails intermittently is worse than no test: it trains the team to ignore
   red. Diagnose the nondeterminism (time, ordering, shared state), fix it, or
   move it to a quarantined lane with an owner and a deadline rather than
   wrapping it in a retry.
5. **Refactor tests and production in separate commits.** When you change both,
   commit the test refactor while behavior is green first, then the behavior
   change. Mixing them means a red suite cannot tell you whether the refactor or
   the feature broke.
6. **Keep one behavior per test and one reason to fail.** Split a test that
   guards several behaviors so a failure names one cause. Rename tests whose
   description drifted from what they now check, since a lying test name costs
   more than no name.

## Signals

- Does changing one production behavior break exactly the tests about that
  behavior, and no unrelated others?
- Can you delete a test and immediately tell from coverage or mutation whether
  it mattered?
- Is there a flaky test currently failing that everyone has silently agreed to
  ignore?

## Boundaries

This keeps an existing suite healthy; it does not decide the initial mix of
tests, which is testing-strategy, or how to design a single test, which is
unit-test-design. Deleting a test is a judgment call: when coverage cannot tell
you whether it matters, keep it and ask a reviewer.

Wersje

RepozytoriumWynikLicencja
Ta strona · Amey-Thakur/AI-SKILLS90MIT
katalon-labs/true-skills100MIT

Migawka bazy z 13.11.2026 · wersja paczki 829480fcdfff (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90testing-code
    Pisze testy na prośbę, na przykład dla funkcji lub test-first przy błędzie, i pomaga, gdy test jest niestabilny albo zestaw jest wolny.
  • 100audit-tests
    Ocenia, czy testy zasługują na koszt utrzymania i który zestaw odpowiada za dany kontrakt, przy przycinaniu redundantnych testów i wykrywaniu sprzężeń z implementacją.
  • 100test-driven-development
    Prowadzi rozwój funkcji i poprawek test-first i ocenia, czy testy zasługują na miejsce w projekcie.
  • 100audit-tests
    Sprawdza, czy testy warte są kosztu utrzymania, i wskazuje, który zestaw testów odpowiada za dany kontrakt.
  • 100refactor
    Bezpiecznie refaktoryzuje kod pod ochroną testów: czyści, upraszcza, wydziela funkcje i poprawia jakość bez zmiany zachowania.
  • 90refactor-safely
    Refaktoryzuje kod bez zmiany jego działania: zmienia nazwy, wyodrębnia, dzieli pliki, usuwa duplikaty i upraszcza funkcje.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.