# Shift Left Testing

Move testing activities earlier in the development lifecycle to catch defects when...

- Repository: https://github.com/proffesor-for-testing/agentic-qe (521 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add proffesor-for-testing/agentic-qe --skill shift-left-testing -g -a claude-code -y`
Codex: `npx skills add proffesor-for-testing/agentic-qe --skill shift-left-testing -g -a codex -y`
Cursor: `npx skills add proffesor-for-testing/agentic-qe --skill shift-left-testing -g -a cursor -y`
Gemini CLI: `npx skills add proffesor-for-testing/agentic-qe --skill shift-left-testing -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add proffesor-for-testing/agentic-qe`

## Description

Move testing activities earlier in the development lifecycle to catch defects when they're cheapest to fix. Use when implementing TDD, CI/CD, or early quality practices.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Shift-Left Testing

<default_to_action>
When implementing early testing practices:
1. VALIDATE requirements before coding (testability, BDD scenarios)
2. WRITE tests before implementation (TDD)
3. AUTOMATE in CI pipeline (every commit triggers tests)
4. FIX defects immediately - never let them accumulate

**Quick Shift-Left Levels:**
- Level 1: Unit tests with each PR (developer responsibility)
- Level 2: TDD practice (tests before code)
- Level 3: BDD/Example mapping in refinement (requirements testing)
- Level 4: Risk analysis in design (architecture testing)
</default_to_action>

## Quick Reference Card

### When to Use
- Reducing cost of defects
- Implementing CI/CD pipelines
- Starting TDD practice
- Improving requirements quality

### Shift-Left Levels
| Level | Practice | When |
|-------|----------|------|
| 1 | Unit tests in PR | Before merge |
| 2 | TDD | Before implementation |
| 3 | BDD/Example Mapping | During refinement |
| 4 | Risk Analysis | During design |

---

## Level 1: Tests in Every PR

```yaml
# CI pipeline - tests run on every commit
name: CI
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm run test:unit
      - run: npm run test:integration
      - run: npm run lint

  quality-gate:
    needs: test
    steps:
      - name: Coverage Check
        run: npx coverage-check --min 80
      - name: No New Warnings
        run: npm run lint -- --max-warnings 0
```

---

## Agent-Assisted Shift-Left

```typescript
// Validate requirements testability
await Task("Requirements Validation", {
  requirements: userStories,
  check: ['INVEST-criteria', 'testability', 'ambiguity'],
  generateBDD: true
}, "qe-requirements-validator");

// Generate tests from requirements
await Task("Generate Tests", {
  source: 'requirements',
  types: ['unit', 'integration', 'e2e'],
  coverage: 'comprehensive'
}, "qe-test-generator");

The rest: https://github.com/proffesor-for-testing/agentic-qe/blob/HEAD/.claude/skills/shift-left-testing/SKILL.md
