Apply systematic test case design techniques including equivalence partitioning, boundary value analysis, decision tables, and state transition testing.
Applies systematic test case design techniques like equivalence partitioning and boundary value analysis when you're designing tests for validation rules, business logic, or state machines. Use it to generate comprehensive test cases with minimal redundancy for any function requiring structured verification.
/plugin marketplace add melodic-software/claude-code-plugins/plugin install test-strategy@melodic-softwareThis skill is limited to using the following tools:
Use this skill when:
Systematic test case design techniques ensure thorough coverage while minimizing test case count. These black-box techniques derive test cases from specifications without knowledge of internal implementation.
Divide input data into equivalent classes where any value should produce the same behavior.
| Partition | Range | Representative | Expected |
|---|---|---|---|
| Invalid (below) | < 18 | 10 | Reject |
| Valid | 18-65 | 30 | Accept |
| Invalid (above) | > 65 | 70 | Reject |
Test Cases:
Combine partitions systematically:
Input A: {Valid, Invalid}
Input B: {Valid, Invalid}
Combinations:
1. A-Valid, B-Valid → Expected: Success
2. A-Valid, B-Invalid → Expected: Error for B
3. A-Invalid, B-Valid → Expected: Error for A
4. A-Invalid, B-Invalid → Expected: Error for both
Test at and around partition boundaries where defects commonly occur.
| Boundary | Test Values | Expected |
|---|---|---|
| Below minimum | 17 | Reject |
| At minimum | 18 | Accept |
| Above minimum | 19 | Accept |
| Normal | 40 | Accept |
| Below maximum | 64 | Accept |
| At maximum | 65 | Accept |
| Above maximum | 66 | Reject |
Extended Boundaries:
public class AgeValidationTests
{
[Theory]
[InlineData(17, false)] // Below minimum
[InlineData(18, true)] // At minimum
[InlineData(19, true)] // Above minimum
[InlineData(40, true)] // Normal
[InlineData(64, true)] // Below maximum
[InlineData(65, true)] // At maximum
[InlineData(66, false)] // Above maximum
[InlineData(0, false)] // Zero
[InlineData(-1, false)] // Negative
public void ValidateAge_ReturnsExpected(int age, bool expected)
{
var result = _validator.IsValidAge(age);
Assert.Equal(expected, result);
}
}
Test complex business rules with multiple conditions systematically.
Conditions:
Actions:
| Rule | Member | Order>$100 | Coupon | Member% | Bulk% | Coupon% |
|---|---|---|---|---|---|---|
| R1 | Y | Y | Y | X | X | X |
| R2 | Y | Y | N | X | X | - |
| R3 | Y | N | Y | X | - | X |
| R4 | Y | N | N | X | - | - |
| R5 | N | Y | Y | - | X | X |
| R6 | N | Y | N | - | X | - |
| R7 | N | N | Y | - | - | X |
| R8 | N | N | N | - | - | - |
public class DiscountCalculationTests
{
public static TheoryData<bool, decimal, bool, decimal> DiscountScenarios => new()
{
{ true, 150m, true, 0.30m }, // R1: Member + Bulk + Coupon
{ true, 150m, false, 0.15m }, // R2: Member + Bulk
{ true, 50m, true, 0.25m }, // R3: Member + Coupon
{ true, 50m, false, 0.10m }, // R4: Member only
{ false, 150m, true, 0.20m }, // R5: Bulk + Coupon
{ false, 150m, false, 0.05m }, // R6: Bulk only
{ false, 50m, true, 0.15m }, // R7: Coupon only
{ false, 50m, false, 0.00m }, // R8: No discount
};
[Theory]
[MemberData(nameof(DiscountScenarios))]
public void CalculateDiscount_ReturnsExpected(
bool isMember, decimal orderTotal, bool hasCoupon, decimal expectedDiscount)
{
var discount = _calculator.Calculate(isMember, orderTotal, hasCoupon);
Assert.Equal(expectedDiscount, discount);
}
}
Test systems with distinct states and transitions between them.
┌──────────┐
│ Draft │
└────┬─────┘
│ submit()
▼
┌──────────┐
┌────│ Pending │────┐
│ └────┬─────┘ │
│ │ approve()│ reject()
│ ▼ ▼
│ ┌──────────┐ ┌──────────┐
│ │ Approved │ │ Rejected │
│ └────┬─────┘ └──────────┘
│ │ ship()
│ ▼
│ ┌──────────┐
└────│ Shipped │
└────┬─────┘
│ deliver()
▼
┌──────────┐
│Delivered │
└──────────┘
| Current State | Event | Next State | Valid |
|---|---|---|---|
| Draft | submit | Pending | ✓ |
| Draft | approve | - | ✗ |
| Pending | approve | Approved | ✓ |
| Pending | reject | Rejected | ✓ |
| Approved | ship | Shipped | ✓ |
| Shipped | deliver | Delivered | ✓ |
| Delivered | * | - | ✗ |
public class OrderStateTests
{
[Fact]
public void Draft_Submit_TransitionsToPending()
{
var order = new Order { Status = OrderStatus.Draft };
order.Submit();
Assert.Equal(OrderStatus.Pending, order.Status);
}
[Fact]
public void Draft_Approve_ThrowsInvalidStateException()
{
var order = new Order { Status = OrderStatus.Draft };
Assert.Throws<InvalidOperationException>(() => order.Approve());
}
[Fact]
public void Delivered_AnyAction_ThrowsFinalStateException()
{
var order = new Order { Status = OrderStatus.Delivered };
Assert.Throws<InvalidOperationException>(() => order.Cancel());
}
}
Efficiently test combinations when full combinatorial testing is impractical.
Most defects are caused by interactions between 2 parameters. Testing all pairs covers most risks with fewer tests.
Parameters:
Full combinations: 4 × 3 × 2 = 24 tests Pairwise coverage: 8-12 tests (covers all pairs)
| Test | Browser | OS | Version |
|---|---|---|---|
| 1 | Chrome | Windows | Latest |
| 2 | Firefox | macOS | Previous |
| 3 | Safari | macOS | Latest |
| 4 | Edge | Windows | Previous |
| 5 | Chrome | Linux | Previous |
| 6 | Firefox | Windows | Latest |
| 7 | Chrome | macOS | Latest |
| 8 | Edge | Linux | Latest |
Use tools like PICT, AllPairs, or online generators.
Experience-based technique to identify likely defect areas.
| Category | Examples |
|---|---|
| Null/Empty | null input, empty string, empty collection |
| Boundaries | off-by-one, overflow, underflow |
| Format | Invalid date, malformed email, wrong encoding |
| State | Race conditions, stale data, concurrency |
| Resources | Memory exhaustion, connection limits, timeouts |
| Security | SQL injection, XSS, path traversal |
| Scenario | Recommended Technique |
|---|---|
| Range validation | Boundary Value + Equivalence |
| Complex business rules | Decision Table |
| State-dependent behavior | State Transition |
| Multi-parameter input | Pairwise |
| Error handling | Error Guessing |
| Critical calculations | All techniques combined |
Inputs from:
test-strategy-planning skill → Coverage targetsOutputs to:
acceptance-criteria-authoring skill → Scenario coverageUse when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.