Skip to content
Back to skills

Runner

ASecurity

**Version:** 1.0.0 **Status:** Production **Purpose:** Unified test execution with benchmarking and regression detection ---

  • 14 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 7, 2026
testingbashsqlgitapidatabaseperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add masharratt/claude-flow-novice --skill runner --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Runner?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Runner
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/masharratt-runner/badge)](https://www.skillsdirectory.com/skills/masharratt-runner)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# CFN Test Runner Skill

**Version:** 1.0.0
**Status:** Production
**Purpose:** Unified test execution with benchmarking and regression detection

---

## Overview

Provides comprehensive test execution across all CFN test suites:
- **Hello World Tests** (Layer 0-7)
- **CFN Loop E2E Tests** (9 integration tests)
- **Benchmark Tracking** (SQLite storage)
- **Regression Detection** (automated alerts)

**Key Features:**
- Single command test execution
- Historical benchmark comparison
- Performance regression alerts
- Git-aware baseline tracking
- Parallel test execution
- Comprehensive reporting

---

## Architecture

### Skill Components

```
.claude/skills/cfn-test-runner/
├── SKILL.md                    # This file
├── run-all-tests.sh            # Main test runner
├── store-benchmarks.sh         # SQLite benchmark storage
├── detect-regressions.sh       # Regression analysis
├── init-benchmark-db.sh        # Database initialization
└── generate-report.sh          # Test report generation
```

---

## Usage

### Run All Tests

```bash
./.claude/skills/cfn-test-runner/run-all-tests.sh \
  --suite all \
  --benchmark \
  --detect-regressions
```

### Run Specific Suite

```bash
# Hello World only
./.claude/skills/cfn-test-runner/run-all-tests.sh --suite hello-world

# CFN E2E only
./.claude/skills/cfn-test-runner/run-all-tests.sh --suite cfn-e2e

# Both
./.claude/skills/cfn-test-runner/run-all-tests.sh --suite all
```

### With Regression Detection

```bash
./.claude/skills/cfn-test-runner/run-all-tests.sh \
  --suite all \
  --benchmark \
  --detect-regressions \
  --threshold 0.10
```

---

## Parameters

### run-all-tests.sh

| Parameter | Required | Description | Default |
|-----------|----------|-------------|---------|
| `--suite` | No | Test suite: `all`, `hello-world`, `cfn-e2e` | `all` |
| `--benchmark` | No | Store results in SQLite | `false` |
| `--detect-regressions` | No | Run regression analysis | `false` |
| `--threshold` | No | Regression threshold (%) | `0.10` |
| `--parallel` | No | Run tests in parallel | `false` |
| `--output` | No | Output format: `text`, `json`, `html` | `text` |

---

## Test Suites

### Hello World (Layer 0-7)

**Purpose:** Validate agent spawning patterns and coordination

| Layer | Test | Duration | Critical |
|-------|------|----------|----------|
| 0 | Tool Validation | 60s | ✅ |
| 1-4 | [Future] | - | - |
| 5 | Coordinator Spawning | 120s | ✅ |
| 6 | Review Handoff | 180s | ✅ |
| 7 | Error Retry | 150s | ✅ |

**Location:** `tests/hello-world/`

### CFN Loop E2E (9 Tests)

**Purpose:** Validate full CFN Loop workflow

| Test | Component | Duration | Critical |
|------|-----------|----------|----------|
| 1 | Coordinator → Orchestrator | 30s | ✅ |
| 2 | Loop 3 → Gate Check | 60s | ✅ |
| 3 | Gate Pass → Loop 2 | 30s | ⚠️ |
| 4 | Loop 2 → Product Owner | 90s | ✅ |
| 5 | Product Owner Decision | 60s | ✅ |
| 6 | Iteration Cycle | 120s | ✅ |
| 7 | Redis Key Structure | 10s | ✅ |
| 8 | Error Recovery | 60s | ⚠️ |
| 9 | Cleanup | 10s | ⚠️ |

**Location:** `tests/cfn-v3/test-e2e-cfn-loop.sh`

---

## Benchmark Storage

### SQLite Schema

```sql
test_suites          -- Suite definitions
test_runs            -- Execution records
test_cases           -- Individual tests
test_results         -- Per-test outcomes
performance_metrics  -- Performance data
regression_alerts    -- Detected regressions
```

**Database:** `.artifacts/test-benchmarks.db`

### Stored Metrics

**Test-Level:**
- Duration (ms)
- Status (passed/failed/skipped)
- Assertion count
- Error messages

**Suite-Level:**
- Total duration (seconds)
- Success rate (%)
- Pass/fail/skip counts
- Git commit/branch

**Performance:**
- Agent spawn time
- Redis operation latency
- File I/O duration
- Memory usage

---

## Regression Detection

### Automatic Alerts

```bash
# Critical: Test started failing
alert_type: test_failure
severity: critical
message: "TEST 5: Product Owner Decision FAILED (was passing)"

# Warning: Performance degraded
alert_type: performance_regression
severity: warning
message: "Loop 3 spawn time increased 25% (baseline: 5s, current: 6.25s)"

# Info: Success rate dropped
alert_type: success_rate_drop
severity: info
message: "Suite success rate: 88% → 77% (threshold: 10%)"
```

### Threshold Configuration

```bash
# Default: 10% regression threshold
--threshold 0.10

# Strict: 5% threshold
--threshold 0.05

# Relaxed: 20% threshold
--threshold 0.20
```

---

## Output Formats

### Text (Console)

```
==========================================
CFN Test Suite Results
==========================================

Suite: Hello World
  Layer 0: ✅ PASSED (58.3s)
  Layer 5: ✅ PASSED (115.7s)
  Layer 6: ✅ PASSED (172.4s)
  Layer 7: ✅ PASSED (148.2s)

Suite: CFN E2E
  TEST 1: ✅ PASSED (28.1s)
  TEST 2: ✅ PASSED (54.6s)
  TEST 3: ⚠️  SKIPPED
  TEST 4: ✅ PASSED (87.3s)
  TEST 5: ✅ PASSED (59.2s)
  TEST 6: ✅ PASSED (118.9s)
  TEST 7: ✅ PASSED (9.4s)

Total: 11 tests, 9 passed, 0 failed, 2 skipped
Duration: 851.1s
Success Rate: 81.8%

Regressions Detected: 0
==========================================
```

### JSON (API/CI)

```json
{
  "timestamp": "2025-11-04T02:00:00Z",
  "git_commit": "abc123",
  "git_branch": "main",
  "suites": {
    "hello-world": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "skipped": 0,
      "duration": 494.6,
      "success_rate": 1.0
    },
    "cfn-e2e": {
      "total": 9,
      "passed": 7,
      "failed": 0,
      "skipped": 2,
      "duration": 356.5,
      "success_rate": 0.778
    }
  },
  "regressions": [],
  "baseline_comparison": {
    "duration_change": "+2.3%",
    "success_rate_change": "+0.0%"
  }
}
```

### HTML (Report)

Generates interactive HTML report with:
- Trend graphs (Chart.js)
- Regression highlights
- Test history
- Performance metrics

---

## Baseline Management

### Establish Baseline

```bash
# First run establishes baseline
./.claude/skills/cfn-test-runner/run-all-tests.sh --suite all --benchmark

# Mark as baseline
sqlite3 .artifacts/test-benchmarks.db << EOF
UPDATE test_runs SET environment = 'baseline' WHERE id = (SELECT MAX(id) FROM test_runs);

Files in this skill

  • SKILL.md6.1 KB
  • detect-regressions.sh1.7 KB
  • detect-regressions.sh.backup-17633928211.5 KB
  • init-benchmark-db.sh1.3 KB
  • run-all-tests.sh5.7 KB
  • store-benchmarks.sh1.8 KB
  • validate-redis-keys.sh4.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.