Qa

From j4flmao/agent-skills · View interactive version

Qa is an AI agent skill from the GitHub repository j4flmao/agent-skills. Use when the user asks for a test strategy, test plan, test cases, equivalence partitioning, boundary value analysis, defect reports, test metrics or test automation strategy. Produces a QA strategy with test design and defect workflow. Not for code quality gates (use qc) or writing unit tests (use

How to use this skill

Skill file

Quality Assurance

Purpose

Design and manage testing activities: test strategy, test case design, defect management, test metrics, and automation strategy.

Agent Protocol

Trigger

Exact user phrases: "test strategy", "test plan", "test case", "test scenario", "equivalence partitioning", "boundary value analysis", "defect report", "test metrics", "regression testing", "smoke test", "automation strategy", "test coverage", "QA plan", "test execution", "exploratory testing".

Input Context

Before activating, verify:

Output Artifact

Writes test plan or test cases to docs/tests/ or produces structured text.

Response Format

Answer exactly:

Test Plan: {feature}

Scope

Test Levels

Test Data

{data setup requirements}

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick. No explanations of testing theory.

Completion Criteria

This skill is complete when:

Max Response Length

Test plan: 30 lines. Test cases: 5 lines per case. Defect report: 10 lines.

Workflow

Step 1: Test Strategy

| Test Level | Who | When | Automation |

|------------|-----|------|------------|

| Unit | Developers | During development | Required (80%+ coverage) |

| Integration | Developers + QA | After unit tests | Required for critical paths |

| E2E | QA | Before release | Critical journeys only |

| Manual / Exploratory | QA | New features, complex UIs | Not automated |

| Regression | QA + CI | Every deployment | Automated suite |

| Smoke | CI | Every build | Full automation |

Step 2: Test Case Design

Equivalence Partitioning:

Input: Age field (1-120)

Partitions:

Valid: 1-120 (one test per boundary)

Invalid: < 1 (e.g., 0, -5)

Invalid: > 120 (e.g., 121, 200)

Invalid: non-numeric (e.g., "abc")

Test cases: age=1, age=120, age=0, age=121, age="abc"

Boundary Value Analysis:

Input: Password length (8-100 chars)

Boundaries: 7, 8, 9, 99, 100, 101

Test cases: password="a"7 (invalid), "a"8 (valid), "a"*101 (invalid)

Step 3: Test Case Template

ID: TC-{n}
Title: {what is being tested}
Precondition: {required state or data}
Steps:
  1. {step}
  2. {step}
Expected: {expected result}
Test Data: {specific values}
Priority: High / Medium / Low

Step 4: Defect Management

Defect Report

ID: BUG-{n}

Severity: Critical / Major / Minor / Trivial

Priority: P0 / P1 / P2 / P3

Environment: {OS, browser, version}

Steps to Reproduce:

1. {step}

2. {step}

Expected: {what should happen}

Actual: {what actually happens}

Attachments: {logs, screenshots}

| Severity | Definition | Response |

|----------|------------|----------|

| Critical | System down, data loss, security breach | Stop release, fix immediately |

| Major | Feature broken, no workaround | Fix before next release |

| Minor | Feature works with limitations | Fix in current sprint or next |

| Trivial | Cosmetic, low impact | Fix when time permits |

Step 5: Automation Strategy

Automation Strategy

Automate (high ROI)

Do NOT Automate (low ROI)

Framework Selection

| Language | Framework | Preferred For |

|----------|-----------|---------------|

| TypeScript | Playwright | E2E, web apps |

| Python | Pytest | API, backend |

| Go | Testify | Go services |

| Rust | cargo test | Rust services |

Step 6: Test Environment Management

Define test environments (dev, staging, integration, pre-prod). Maintain environment parity with production. Manage test data across environments. Coordinate environment availability with release schedule. Monitor environment health and reset periodic.

Step 7: Test Execution and Reporting

Execute test cases in priority order. Track execution progress daily. Document test results with pass/fail counts. Report blockers immediately. Generate test summary report after each test cycle.

Step 8: Regression Test Suite Management

Maintain regression suite: add tests for new features, remove redundant tests, update obsolete tests. Monitor suite execution time (< 30 min target). Review flaky tests weekly. Prioritize regression tests by risk and criticality.

Step 9: Exploratory Testing Sessions

Schedule exploratory testing for new features and complex areas. Define charter (scope and focus). Set timebox (typically 60-90 min). Document findings as test notes or defect reports. Debrief with team.

Step 10: Test Completion and Sign-off

Verify all planned tests executed. Review open defects and blocker status. Confirm acceptance criteria met. Produce test completion report. Obtain stakeholder sign-off for go/no-go decision.

Framework / Methodologies

Testing Framework Comparison

| Aspect | Waterfall / V-Model | Agile / Scrum | Shift-Left | Shift-Right | Risk-Based |

|--------|---------------------|---------------|------------|-------------|------------|

| Testing phase | After development | Throughout sprint | During development | Production | Throughout |

| Test planning | Detailed upfront | Continuous refinement | Before coding | After release | Risk-weighted |

| Test creation | Full test cases | ATDD/BDD acceptance criteria | Unit tests first | A/B tests, monitoring | Risk-based selection |

| Automation | Late automation | Built-in automation | From start | Monitoring | Critical paths only |

| Feedback cycle | Weeks | Days | Hours | Real-time | Varies |

| Best For | Regulated/contract | Product development | CI/CD pipelines | Production validation | Resource-limited |

Decision Tree: Test Approach Selection

What is the project context?
  ├── Regulatory / compliance (FDA, PCI-DSS, SOC2)
  │   └── V-Model with formal test phases, traceability matrix, auditable documentation
  ├── Agile product development
  │   └── Agile testing: ATDD, automated regression, exploratory testing
  ├── Established product with CI/CD
  │   └── Shift-left: unit tests, static analysis, contract tests in pipeline
  ├── Production system with live users
  │   └── Shift-right: canary testing, feature flags, production monitoring
  └── Resource-constrained / quick delivery
      └── Risk-based testing: prioritize tests by probability × impact

Test Design Technique Selection

| Technique | Best For | Defect Types Found | Effort | Coverage |

|-----------|----------|-------------------|--------|----------|

| Equivalence Partitioning | Input validation | Range/logic errors | Low | High |

| Boundary Value Analysis | Input boundaries | Off-by-one errors | Low | High |

| Decision Table | Business rules | Missing rule combinations | Medium | Very high |

| State Transition | Stateful workflows | Invalid state transitions | Medium | High |

| Pairwise Testing | Configuration combination | Interaction bugs | Medium | High |

| Use Case Testing | User workflows | Workflow breaks | Low | Medium |

| Error Guessing | Common error patterns | Implementation errors | Low | Low |

| Exploratory Testing | New features, complex UIs | Design/usability issues | Medium | Variable |

| Risk-Based Testing | Resource-constrained | High-impact defects | High | Risk-weighted |

Common Pitfalls

Pitfall 1: Testing Only Happy Paths

The most common testing mistake — covering only the expected workflow and missing error handling, edge cases, and boundary conditions. Every feature has at least as many error paths as happy paths. Test them all.

Pitfall 2: Automating Everything

Automating unstable or frequently changing features creates high maintenance burden and brittle tests. Not everything benefits from automation. Manual testing and exploratory testing are essential for complex UIs, new features, and usability.

Pitfall 3: Ignoring Test Data Management

Tests that depend on shared or dynamic test data are flaky and unreliable. Tests should create their own data or use dedicated test data sets. Test data should be consistent, predictable, and isolated between test runs.

Pitfall 4: Flaky Tests Left Unaddressed

Flaky tests (pass/fail inconsistently) erode trust in the test suite. When developers see failing tests they ignore, they stop paying attention to real failures. Track flaky tests, quarantine them, and fix or remove them within a sprint.

Pitfall 5: Testing in Production-Like Environment Too Late

Discovering environment differences (different configs, data, versions) late in the cycle causes last-minute surprises. Test environments should mirror production as closely as possible. Test in staging before release.

Pitfall 6: Insufficient Non-Functional Testing

Focusing exclusively on functional testing while ignoring performance, security, usability, and reliability. Non-functional issues discovered in production are more expensive to fix. Include non-functional testing in the test strategy.

Pitfall 7: Defect Reports Without Reproduction Steps

A defect report that says "it doesn't work" cannot be actioned. Every defect must include clear steps to reproduce, expected vs actual results, environment details, and supporting evidence.

Pitfall 8: Regression Suite That Takes Hours

A regression suite that takes hours to run is rarely run. Developers skip it, CI pipelines get bypassed. Keep the suite fast (under 30 minutes). Split if needed — run critical tests on every commit, full suite nightly.

Pitfall 9: Testing Without Requirements

Testing without clear acceptance criteria or requirements leads to subjective pass/fail decisions. Every test must have a clear expected result. If the requirement is unclear, clarify before testing.

Pitfall 10: No Test Metrics Visibility

Running tests without tracking results, trends, and coverage means you have no data to improve. Track pass rate, coverage, defect density, and regression suite duration. Make metrics visible to the entire team.

Best Practices

Templates & Tools

Test Plan Template

test_plan:
  feature: Order Management Module
  version: 1.0
  scope:
    in_scope:
      - Order creation (web UI + API)
      - Order search and filtering
      - Order status management
      - Order export (CSV, PDF)
    out_of_scope:
      - Payment processing
      - Inventory management
      - User administration
  test_levels:
    unit:
      target: 85% line coverage
      responsibility: Developers
    integration:
      focus: Order service API, database, external search service
    e2e:
      journeys:
        - Create order → process payment → confirm order
        - Search orders → export results
        - Cancel order → verify refund
    regression:
      scope: All existing order functionality
      frequency: Every deployment
    smoke:
      scope: Create order, search orders
      frequency: Every build
  environments:
    - development: Developer machines, local DB
    - staging: Staging cluster (us-east-1), test data set
    - integration: Integration sandbox, real third-party APIs
  test_data:
    - Predefined customer accounts (buyer, admin, support)
    - Product catalog subset (50 products)
    - Sample orders (pending, confirmed, cancelled, shipped)
    - Test credit card numbers

Test Case Template

test_case:
  id: TC-ORD-001
  title: Create order with valid items
  feature: Order Creation
  priority: High
  prerequisites:
    - User is logged in as a buyer
    - At least 3 products with sufficient inventory exist
  test_data:
    - product_ids: ["PROD-001", "PROD-002", "PROD-003"]
    - quantity: 2
    - shipping_address: "123 Test St"
  steps:
    - step: Navigate to product catalog
      expected: Product list displayed
    - step: Add PROD-001 to cart (qty: 2)
      expected: Cart shows item with correct quantity and price
    - step: Add PROD-002 to cart (qty: 1)
      expected: Cart shows 2 items, total updated
    - step: Proceed to checkout
      expected: Checkout form displayed with shipping and payment sections
    - step: Enter shipping address and select shipping method
      expected: Shipping cost calculated and displayed
    - step: Enter valid payment details
      expected: Payment method accepted
    - step: Submit order
      expected: Order confirmation displayed with order ID
    - step: Verify order in order history
      expected: Order appears with status "Confirmed"

Defect Report Template

defect:
  id: BUG-ORD-042
  title: Order confirmation email not sent for international orders
  severity: Major
  priority: P1
  environment:
    browser: Chrome 124
    os: Windows 11
    app_version: v2.1.3
    deployment: staging
  steps_to_reproduce:
    - Log in as buyer with international shipping address
    - Add product to cart and proceed to checkout
    - Enter international shipping address
    - Complete payment
    - Submit order
    - Check email inbox
  expected: Order confirmation email received within 60 seconds
  actual: No email received. No email entry in the email service logs.
  attachments:
    - logs/email-service-error-2026-04-15.log
    - screenshots/order-confirmation-screen.png
  workaround: Order is created successfully in the system. Manual email sent by support.
  root_cause_analysis: Email service not configured for international address format

Case Studies (illustrative scenarios — figures are examples, not sourced benchmarks)

Case Study 1: Fintech — Test Automation Transformation

A fintech company had manual-only testing with release cycles of 4 weeks. They implemented Playwright for E2E, Pytest for API testing, and integrated tests into the CI pipeline. Regression suite ran in 12 minutes. Release cycle reduced to weekly. Production defects dropped 60%. Key success factor: dedicated automation team for 3 months to build the initial framework.

Case Study 2: E-Commerce Platform — Flaky Test Crisis

A growing e-commerce platform had 1,200 E2E tests with a 40% flake rate. Tests failed randomly, developers ignored failures, and defects leaked to production. The team spent 2 sprints quarantining flaky tests, fixing root causes (test data isolation, timing, environment dependency), and reducing the flake rate to 3%. The remaining test suite went from 1,200 to 400 reliable tests — with better coverage.

Case Study 3: Healthcare — Risk-Based Testing for Compliance

A healthcare SaaS company needed to release quickly while maintaining HIPAA compliance. They implemented risk-based testing: critical path tests (authentication, authorization, data access) ran on every commit; full regression ran nightly; compliance audit suite ran weekly. This balanced speed and compliance. Audit findings related to testing were reduced by 80%.

Case Study 4: Retail — Shift-Left with Contract Testing

A retail company implemented consumer-driven contract testing (Pact) for microservices. Integration issues between services dropped 90%. Developer feedback cycle reduced from days to minutes. The contract test suite caught breaking changes before they reached staging.

Rules

References

Handoff

After completing this skill:

Architecture Decision Trees

Test Strategy Selection

| Decision Point | Option A | Option B | Decision Criteria |

|---|---|---|---|

| Test pyramid shape | Ice cream cone (lots of E2E) | Classical pyramid (lots of unit) | Application type, team maturity |

| Automation approach | Record & playback (fast start) | Code-first (maintainable) | Longevity, team skill, CI integration |

| Test data strategy | Production clone (realistic) | Synthetic data (controlled) | Privacy compliance, data volume |

Automation Framework Decision

Implementation Patterns

Test Plan Template

`markdown

Test Plan: {project}

Scope

Test Levels

| Level | Tools | Coverage Target |

|---|---|---|

| Unit | Jest | 85% line coverage |

| Integration | Supertest | All API endpoints |

| E2E | Playwright | Critical paths |

| Manual | TestRail | Exploratory |

Schedule

Entry / Exit Criteria

Entry

Exit

`

Defect Report Template

`markdown

Bug: {title}

1. {step}

2. {step}

`

Production Considerations

Test Environment

Release Gating

Anti-Patterns

| Anti-Pattern | Symptom | Solution |

|---|---|---|

| Testing everything the same way | Slow E2E tests for simple logic | Match test type to risk (unit for logic, E2E for flows) |

| Manual regression testing | 3-day regression cycles, human error | Automate regression, limit manual to exploratory |

| Flaky test tolerance | Random CI failures, team ignores tests | Investigate and fix or quarantine flaky tests immediately |

| Bug report without reproduction | Developer cannot reproduce | Enforce reproduction steps requirement in template |

| Testing after code freeze | No time to fix found bugs | Shift left — test during development, not after |

Performance Optimization

Test Execution Speed

CI Integration

Security Considerations

Test Security

Vulnerability Testing

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.