Test hook rules for correct behavior
Validates hook rule behavior through systematic testing with scenario-based fixtures.
/plugin marketplace add tbhb/oaps/plugin install oaps@oapsrule-idhook/You are helping a developer validate hook rule behavior through systematic testing.
Test scope: $ARGUMENTS
Load skill context - Run oaps skill context hook-rule-writing --references troubleshooting to get detailed guidance
Determine scope - Based on arguments:
Validate syntax - Run oaps hooks validate to check configuration:
Create test scenarios - For the target rule(s), create test fixtures:
Design test scenarios for rule: [rule ID]
Create JSON fixtures for:
- Expected matches (should trigger the rule)
- Expected non-matches (should not trigger)
- Edge cases (boundary conditions)
Each fixture should include the event context the rule evaluates against.
Run tests - Execute oaps hooks test with the fixtures:
Verify behavior - For matching rules, confirm:
Test edge cases - Validate boundary conditions:
Present results - Summarize test outcomes:
Save fixtures - If tests pass, offer to save fixtures for regression testing: