testing
/testing
Projektuje skuteczne testy: jednostkowe czy integracyjne, przypadki brzegowe, układ arrange-act-assert i minimalny test błędu przed poprawką.
- Autor
- microclaw ↗
- Repozytorium
- microclaw ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 26.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.
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
- What to test (priority order)
- Shape: Arrange–Act–Assert
- Practical guidance
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
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · microclaw/microclaw | 100 | MIT |
| iuliandita/skills | 100 | MIT |
| wrongstack/wrongstack | 100 | MIT |
| langwatch/langwatch | 100 | Apache-2.0 |
| mcouthon/agents | 100 | MIT |
| nteract/nteract | 100 | BSD-3-Clause |
| kettleofketchup/DraftForge | 100 | GPL-3.0 |
| skillberry-ai/cap-evolve | 100 | Apache-2.0 |
| TheBeardedBearSAS/claude-craft | 100 | MIT |
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.