From delivery-plugin
境界条件・エッジケースの観測。null/空/0/最大値/最小値/オーバーフロー/タイムゾーン等を網羅的にテスト。Use when: テスト設計、バリデーション実装、パーサー実装、日付/金額処理、例は通るが端で壊れる疑い、バグ修正後の再発防止。
How this skill is triggered — by the user, by Claude, or both
Slash command
/delivery-plugin:boundary-observationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
生成コードは「平均的なケースに強く、端に弱い」傾向がある。
生成コードは「平均的なケースに強く、端に弱い」傾向がある。 このスキルは、入力空間の端での欠陥を発見し、自己欺瞞を崩す。
対象コードの「外部境界」を列挙する。
外部境界の例:
各外部境界に対して、以下のテストケースを設計する:
| カテゴリ | テストケース |
|---|---|
| 最小値 | 下限値、下限-1 |
| 最大値 | 上限値、上限+1 |
| 空/null | null、空文字、空配列 |
| 異常値 | 不正な型、不正なフォーマット |
重要なロジックに対して、期待値に依存しない性質テストを1本以上設計する。
検証すべき性質の例:
以下のコンポーネントには特にファズテストが効く:
実際にどんな値が来ているかを観測し、テストケースを補強する。
詳細は references/boundary-catalog.md を参照。
# 境界値テスト
@pytest.mark.parametrize("date_str,expected", [
("2024-01-01", date(2024, 1, 1)), # 通常
("2024-02-29", date(2024, 2, 29)), # うるう年
("2023-02-29", ValueError), # 非うるう年 → 異常
("", ValueError), # 空文字
(None, TypeError), # null
("9999-12-31", date(9999, 12, 31)), # 最大年
])
def test_parse_date_boundaries(date_str, expected):
...
# 性質テスト: 金額の加算は交換律を満たす
from hypothesis import given, strategies as st
@given(st.integers(min_value=0), st.integers(min_value=0))
def test_add_money_commutative(a, b):
assert add_money(a, b) == add_money(b, a)
# 性質テスト: 割引後の金額は元の金額以下
@given(st.integers(min_value=0, max_value=1000000), st.floats(min_value=0, max_value=1))
def test_discount_reduces_price(price, discount_rate):
result = apply_discount(price, discount_rate)
assert result <= price
npx claudepluginhub caphtech/claude-marketplace --plugin delivery-pluginIdentify and test boundary values for input validation. Use when designing test cases for numeric ranges, dates, and string lengths.
Provides Java unit test patterns for boundary conditions, edge cases, and limits using JUnit 5 and AssertJ. Tests min/max values, nulls, empty collections, overflow/underflow, precision, off-by-one. Use for .java test files.
Writes property-based tests using Hegel across Rust, Go, C++, and TypeScript projects. Generates random inputs and shrinks failures to minimal counterexamples.