Main Site โ†—

shift-right-testing

by proffesor-for-testing28625GitHub

This skill provides concrete patterns for testing in production environments using feature flags, canary deployments, and chaos experiments. It includes specific code examples for implementing progressive rollouts and monitoring key metrics like error rates and latency.

Unlock Deep Analysis

Use AI to visualize the workflow and generate a realistic output preview for this skill.

Powered by Fastest LLM

Target Audience

DevOps engineers and SREs implementing progressive delivery and production monitoring

10/10Security

Low security risk, safe to use

9
Clarity
8
Practicality
7
Quality
8
Maintainability
7
Innovation
Testing
production-testingcanary-deploymentfeature-flagschaos-engineeringmonitoring
Compatible Agents
Claude Code
Claude Code
~/.claude/skills/
Codex CLI
Codex CLI
~/.codex/skills/
Gemini CLI
Gemini CLI
~/.gemini/skills/
O
OpenCode
~/.opencode/skills/
O
OpenClaw
~/.openclaw/skills/
GitHub Copilot
GitHub Copilot
~/.copilot/skills/
Cursor
Cursor
~/.cursor/skills/
W
Windsurf
~/.codeium/windsurf/skills/
C
Cline
~/.cline/skills/
R
Roo Code
~/.roo/skills/
K
Kiro
~/.kiro/skills/
J
Junie
~/.junie/skills/
A
Augment Code
~/.augment/skills/
W
Warp
~/.warp/skills/
G
Goose
~/.config/goose/skills/
SKILL.md

Shift-Right Testing

<default_to_action> When testing in production or implementing progressive delivery:

  1. IMPLEMENT feature flags for progressive rollout (1% โ†’ 10% โ†’ 50% โ†’ 100%)
  2. DEPLOY with canary releases (compare metrics before full rollout)
  3. MONITOR with synthetic tests (proactive) + RUM (reactive)
  4. INJECT failures with chaos engineering (build resilience)
  5. ANALYZE production data to improve pre-production testing

Quick Shift-Right Techniques:

  • Feature flags โ†’ Control who sees what, instant rollback
  • Canary deployment โ†’ 5% traffic, compare error rates
  • Synthetic monitoring โ†’ Simulate users 24/7, catch issues before users
  • Chaos engineering โ†’ Netflix-style failure injection
  • RUM (Real User Monitoring) โ†’ Actual user experience data

Critical Success Factors:

  • Production is the ultimate test environment
  • Ship fast with safety nets, not slow with certainty
  • Use production data to improve shift-left testing </default_to_action>

Quick Reference Card

When to Use

  • Progressive feature rollouts
  • Production reliability validation
  • Performance monitoring at scale
  • Learning from real user behavior

Shift-Right Techniques

TechniquePurposeWhen
Feature FlagsControlled rolloutEvery feature
CanaryCompare new vs oldEvery deployment
Synthetic MonitoringProactive detection24/7
RUMReal user metricsAlways on
Chaos EngineeringResilience validationRegularly
A/B TestingUser behavior validationFeature decisions

Progressive Rollout Pattern

1% โ†’ 10% โ†’ 25% โ†’ 50% โ†’ 100%
โ†“      โ†“      โ†“      โ†“
Check  Check  Check  Monitor

Key Metrics to Monitor

MetricSLO TargetAlert Threshold
Error rate< 0.1%> 1%
p95 latency< 200ms> 500ms
Availability99.9%< 99.5%
Apdex> 0.95< 0.8

Feature Flags

// Progressive rollout with LaunchDarkly/Unleash pattern
const newCheckout = featureFlags.isEnabled('new-checkout', {
  userId: user.id,
  percentage: 10,  // 10% of users
  allowlist: ['beta-testers']
});

if (newCheckout) {
  return <NewCheckoutFlow />;
} else {
  return <LegacyCheckoutFlow />;
}

// Instant rollback on issues
await featureFlags.disable('new-checkout');

Canary Deployment

# Flagger canary config
apiVersion: flagger.app/v1beta1
kind: Canary
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: checkout-service
  progressDeadlineSeconds: 60
  analysis:
    interval: 1m
    threshold: 5      # Max failed checks
    maxWeight: 50     # Max traffic to canary
    stepWeight: 10    # Increment per interval
    metrics:
      - name: request-success-rate
        threshold: 99
      - name: request-duration
        threshold: 500

Synthetic Monitoring

// Continuous production validation
await Task("Synthetic Tests", {
  endpoints: [
    { path: '/health', expected: 200, interval: '30s' },
    { path: '/api/products', expected: 200, interval: '1m' },
    { path: '/checkout', flow: 'full-purchase', interval: '5m' }
  ],
  locations: ['us-east', 'eu-west', 'ap-south'],
  alertOn: {
    statusCode: '!= 200',
    latency: '> 500ms',
    contentMismatch: true
  }
}, "qe-production-intelligence");

Chaos Engineering

// Controlled failure injection
await Task("Chaos Experiment", {
  hypothesis: 'System handles database latency gracefully',
  steadyState: {
    metric: 'error_rate',
    expected: '< 0.1%'
  },
  experiment: {
    type: 'network-latency',
    target: 'database',
    delay: '500ms',
    duration: '5m'
  },
  rollback: {
    automatic: true,
    trigger: 'error_rate > 5%'
  }
}, "qe-chaos-engineer");

Production โ†’ Pre-Production Feedback Loop

// Convert production incidents to regression tests
await Task("Incident Replay", {
  incident: {
    id: 'INC-2024-001',
    type: 'performance-degradation',
    conditions: { concurrent_users: 500, cart_items: 10 }
  },
  generateTests: true,
  addToRegression: true
}, "qe-production-intelligence");

// Output: New test added to prevent recurrence

Agent Coordination Hints

Memory Namespace

aqe/shift-right/
โ”œโ”€โ”€ canary-results/*      - Canary deployment metrics
โ”œโ”€โ”€ synthetic-tests/*     - Monitoring configurations
โ”œโ”€โ”€ chaos-experiments/*   - Experiment results
โ”œโ”€โ”€ production-insights/* - Issues โ†’ test conversions
โ””โ”€โ”€ rum-analysis/*        - Real user data patterns

Fleet Coordination

const shiftRightFleet = await FleetManager.coordinate({
  strategy: 'shift-right-testing',
  agents: [
    'qe-production-intelligence',  // RUM, incident replay
    'qe-chaos-engineer',           // Resilience testing
    'qe-performance-tester',       // Synthetic monitoring
    'qe-quality-analyzer'          // Metrics analysis
  ],
  topology: 'mesh'
});

Related Skills


Remember

Production is the ultimate test environment. Feature flags enable instant rollback. Canary catches issues before 100% rollout. Synthetic monitoring detects problems before users. Chaos engineering builds resilience. RUM shows real user experience.

With Agents: Agents monitor production, replay incidents as tests, run chaos experiments, and convert production insights to pre-production tests. Use agents to maintain continuous production quality.

Source: https://github.com/proffesor-for-testing/agentic-qe#.claude~skills~shift-right-testing

Content curated from original sources, copyright belongs to authors

Grade A
7.5AI Score
Best Practices
Checking...
Try this Skill

User Rating

USER RATING

0UP
0DOWN
Loading files...

WORKS WITH

Claude Code
Claude
Codex CLI
Codex
Gemini CLI
Gemini
O
OpenCode
O
OpenClaw
GitHub Copilot
Copilot
Cursor
Cursor
W
Windsurf
C
Cline
R
Roo
K
Kiro
J
Junie
A
Augment
W
Warp
G
Goose