mcpField
Q
qe-chaos-resilience

qe-chaos-resilience

github.com/proffesor-for-testingテスト・品質51987 回インストール今日更新
リポジトリ

qe-chaos-resilience について

qe-chaos-resilienceは、v3のカオスエンジニアリング機能を案内するエージェントスキルです。レジリエンス、負荷、災害復旧のテストに向け、障害注入や安全制御を扱います。

主な機能

  1. 01制御された障害注入
  2. 02負荷テストとストレステスト
  3. 03レジリエンスシナリオの検証
  4. 04災害復旧テスト
  5. 05影響範囲と中止条件の制御
  6. 06SLA検証

活用シーン

  1. 01ネットワーク遅延時のサービス動作テスト
  2. 02エンドポイントの負荷限界の特定
  3. 03データベースのフェイルオーバーと復旧の検証
  4. 04サービスのSLA適合性の確認

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/proffesor-for-testing/agentic-qe --skill qe-chaos-resilience

インストール後、Claude Code で/qe-chaos-resilienceを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

evals/
qe-chaos-resilience.yaml
schemas/
output.json
scripts/
validate-config.json

詳細

QE カオス耐性

目的

制御された障害注入、負荷/ストレステスト、耐性の検証、災害復旧テストなど、v3 のカオスエンジニアリング機能の活用方法を説明します。

有効化する場面

  • システムの耐性をテストするとき
  • カオス実験を実施するとき
  • 負荷/ストレステストを実施するとき
  • 災害復旧を検証するとき
  • サーキットブレーカーをテストするとき

クイックスタート

# Run chaos experiment
aqe chaos run --experiment network-latency --target api-service

# Load test
aqe chaos load --scenario peak-traffic --duration 30m

# Stress test to breaking point
aqe chaos stress --endpoint /api/users --max-users 10000

# Test circuit breaker
aqe chaos circuit-breaker --service payment-service

エージェントのワークフロー

// Chaos experiment
Task("Run chaos experiment", `
  Execute controlled chaos on api-service:
  - Inject 500ms network latency
  - Monitor service health metrics
  - Verify circuit breaker activation
  - Measure recovery time
  - Document findings
`, "qe-chaos-engineer")

// Load testing
Task("Performance load test", `
  Run load test simulating Black Friday traffic:
  - Ramp up to 10,000 concurrent users
  - Maintain load for 30 minutes
  - Monitor response times and error rates
  - Identify bottlenecks
  - Compare against SLAs
`, "qe-load-tester")

カオス実験

1. 障害注入
await chaosEngineer.injectFault({
  target: 'api-service',
  fault: {
    type: 'latency',
    parameters: {
      delay: '500ms',
      jitter: '100ms',
      percentage: 50
    }
  },
  duration: '5m',
  monitoring: {
    metrics: ['response_time', 'error_rate', 'throughput'],
    alerts: true
  },
  rollback: {
    automatic: true,
    trigger: 'error_rate > 10%'
  }
});
2. 負荷テスト
await loadTester.execute({
  scenario: 'peak-traffic',
  profile: {
    rampUp: '5m',
    steadyState: '30m',
    rampDown: '5m'
  },
  users: {
    initial: 100,
    target: 5000,
    pattern: 'linear'
  },
  assertions: {
    p95_latency: '<500ms',
    error_rate: '<1%',
    throughput: '>1000rps'
  }
});
3. ストレステスト
await loadTester.stressTest({
  endpoint: '/api/checkout',
  strategy: 'step-increase',
  steps: [100, 500, 1000, 2000, 5000],
  stepDuration: '5m',
  findBreakingPoint: true,
  monitoring: {
    resourceUtilization: true,
    databaseConnections: true,
    memoryUsage: true
  }
});
4. 耐性の検証
await resilienceTester.validate({
  scenarios: [
    'database-failover',
    'cache-failure',
    'external-service-timeout',
    'pod-termination'
  ],
  expectations: {
    gracefulDegradation: true,
    automaticRecovery: true,
    dataIntegrity: true,
    recoveryTime: '<30s'
  }
});

障害の種類

障害説明ユースケース
レイテンシネットワーク遅延を追加するタイムアウトをテストする
パケット損失ネットワークパケットを破棄する再試行ロジックをテストする
CPU 負荷CPU を消費するリソース制限をテストする
メモリ負荷メモリを消費するOOM 処理をテストする
ディスク容量不足ディスク領域を使い切るディスクエラーをテストする
プロセス終了プロセスを終了する復旧をテストする

カオスレポート

interface ChaosReport {
  experiment: {
    name: string;
    target: string;
    fault: FaultConfig;
    duration: number;
  };
  results: {
    hypothesis: string;
    validated: boolean;
    metrics: {
      before: MetricSnapshot;
      during: MetricSnapshot;
      after: MetricSnapshot;
    };
    events: ChaosEvent[];
    recovery: {
      detected: boolean;
      time: number;
      automatic: boolean;
    };
  };
  findings: {
    severity: 'critical' | 'high' | 'medium' | 'low';
    description: string;
    recommendation: string;
  }[];
  artifacts: {
    logs: string;
    metrics: string;
    traces: string;
  };
}

安全制御

safety:
  blast_radius:
    max_affected_pods: 1
    max_affected_percentage: 10

  abort_conditions:
    - error_rate > 50%
    - p99_latency > 10s
    - service_unavailable

  excluded_environments:
    - production-critical

  required_approvals:
    production: 2
    staging: 0

SLA の検証

await resilienceTester.validateSLA({
  slas: {
    availability: 99.9,
    p95_latency: 500,
    error_rate: 0.1
  },
  period: '30d',
  report: {
    breaches: true,
    trends: true,
    projections: true
  }
});

連携

主なエージェント:qe-chaos-engineer、qe-load-tester、qe-resilience-tester コーディネーター:qe-chaos-coordinator 関連スキル:qe-performance、security-testing

コメント