Przejdź do treści
Biblioteka skilli
Programowanie · Planowanie

testing

/testing

Projektuje skuteczne testy: jednostkowe czy integracyjne, przypadki brzegowe, układ arrange-act-assert i minimalny test błędu przed poprawką.

Repozytorium
microclaw ↗
Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 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ść35 / 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 26.10.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

Projektuje skuteczne testy: jednostkowe czy integracyjne, przypadki brzegowe, układ arrange-act-assert i minimalny test błędu przed poprawką.

Oryginalny opis (EN)

Design effective tests and decide what to test: unit vs integration, edge cases, the arrange-act-assert shape, and writing the minimal failing test for a bug. Use when users want tests for code, ask what cases to cover, want to improve coverage meaningfully, or practice TDD. Triggers on mentions of test, unit test, integration test, coverage, edge cases, TDD, assert, mock, 测试, 单元测试, 用例, 覆盖率, 边界条件.

Jak działa

  1. What to test (priority order)
  2. Shape: Arrange–Act–Assert
  3. Practical guidance
Sekcje z nagłówków SKILL.md, w oryginale · 35 linii, 216 słów
Podgląd SKILL.md
---
name: testing
description: "Design effective tests and decide what to test: unit vs integration, edge cases, the arrange-act-assert shape, and writing the minimal failing test for a bug. Use when users want tests for code, ask what cases to cover, want to improve coverage meaningfully, or practice TDD. Triggers on mentions of test, unit test, integration test, coverage, edge cases, TDD, assert, mock, 测试, 单元测试, 用例, 覆盖率, 边界条件."
license: Proprietary. LICENSE.txt has complete terms
compatibility: "No external dependencies. Works on macOS, Linux, and Windows."
---

# Testing

Good tests pin down behavior and fail for one clear reason. Chase meaningful cases, not a
coverage number.

## What to test (priority order)

1. **The contract** — for each function: typical input → expected output.
2. **Edge cases** — empty, single element, very large, zero/negative, null/None, unicode,
   boundary values (off-by-one), duplicates.
3. **Error paths** — invalid input rejected, exceptions raised/handled, partial failure.
4. **Regressions** — every fixed bug gets a test that fails before the fix and passes after.
5. **Integration seams** — where modules/services meet (fewer, broader tests here).

## Shape: Arrange–Act–Assert

```python
def test_discount_caps_at_zero():
    cart = Cart(items=[Item(price=10)])   # arrange
    total = cart.total(discount=2.0)      # act  (200% off)
    assert total == 0                     # assert: never negative
```

- One behavior per test; name it after the behavior (`test_discount_caps_at_zero`).
- Make failures readable: assert on specific values, not just "truthy".

## Practical guidance

- Prefer many small fast unit tests + a few integration tests (the test pyramid).
- Keep tests deterministic: no real network/clock/randomness — inject or mock them.
- Mock at boundaries you own; don't mock the thing under test.
- For a bug: write the **minimal failing test first**, then fix until it's green.
- Run the suite to confirm, and report what passed/failed — don't claim green without running it.

Wersje

RepozytoriumWynikLicencja
Ta strona · microclaw/microclaw100MIT
iuliandita/skills100MIT
wrongstack/wrongstack100MIT
langwatch/langwatch100Apache-2.0
mcouthon/agents100MIT
nteract/nteract100BSD-3-Clause
kettleofketchup/DraftForge100GPL-3.0
skillberry-ai/cap-evolve100Apache-2.0
TheBeardedBearSAS/claude-craft100MIT

Migawka bazy z 13.11.2026 · wersja paczki bb60ba212213 (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

  • 86unit-test
    Pisze izolowane testy jednostkowe dla wskazanego pliku w schemacie Arrange-Act-Assert.
  • 95tdd
    Przypomina zasady TDD: cykl czerwony, zielony, refaktoryzacja, zasady FIRST oraz strukturę Arrange-Act-Assert.
  • 84tdd-assistant
    Opisuje cykl czerwony-zielony-refaktoryzacja, zasady FIRST i strukturę Arrange-Act-Assert dla testów pisanych przed kodem.
  • 90unit-test-design
    Pomaga pisać testy jednostkowe, które dokumentują zachowanie przez jawne fazy arrange-act-assert i jedną asercję intencji.
  • 100writing-tests
    Pisze ukierunkowane testy jednostkowe i integracyjne dla funkcji TypeScript z jawnymi zależnościami i mockami.
  • 100test-writer
    Pisze testy jednostkowe dla dowolnej funkcji: ścieżka szczęśliwa, przypadki brzegowe i błędy, także w praktyce TDD.

Uwagi i zgłoszenia

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