All skills
fugazi avatar

/qa-investigation

@bfc4714

Investigate a specific test failure to its root cause and document the why. Detects whether a failing test is flaky (intermittent) or a deterministic bug during reproduction. Use when a test fails and you need the real cause, not just to make it green. Execution layer, not strategy review. Keywords: flaky test, intermittent failure, debugging tests, root cause analysis, test failure triage, bug hunt, why does this test fail.

Use this Skill: https://skilld.dev/gh/fugazi/test-automation-skills-agents/qa-investigation

This session only. Nothing lands on disk.

referencesexamples.md

≈858 tokens on demand. Your agent reads this file only when SKILL.md points to it.

QA Investigation — Examples

Part of the qa-investigation skill. See SKILL.md for full context.

Concrete examples of how the investigation plays out. Tool-agnostic: each shows the reasoning, not a specific framework. The terms are illustrative — substitute your own stack.

Example 1 — Flaky (intermittent) failure

Symptom: a test fails ~30% of the time in the CI pipeline, but always passes locally. The failure is a timeout waiting on a UI control.

Phase 1 — Triage. Reproduce by varying parallelism: with a single worker it passes; with many workers it fails intermittently. This isolates the trigger and classifies it as flaky (intermittent), not a deterministic bug.

Phase 2 — Evidence. Capture a trace showing the click fired before the control's handler was ready. Note the environment: CI with parallel workers.

Phase 3 — Root cause. A race condition: the test drove the action before the application finished wiring the handler for the control. The click was lost.

Phase 4 — Fix. Wait on the dependency/state to be ready before acting, plus a bounded retry with backoff. Rejected alternative: a blanket longer timeout (it only hides the race) and a fixed sleep (it is fragile and machine-dependent).

Phase 5 — Prevention. Extract a shared "wait until ready" helper, add a lint rule that rejects fixed sleeps in new tests, and document the pattern.

Outcome: stable — 0 fails over 100 runs.


Example 2 — Deterministic bug

Symptom: a test fails every time under the same conditions, with a consistent assertion mismatch.

Phase 1 — Triage. Reproduces consistently on repeat and regardless of parallelism. Classified as deterministic bug, not flaky.

Phase 2 — Evidence. A clear, reproducible assertion failure with a stable stack trace and the exact expected-vs-actual values.

Phase 3 — Root cause. An application logic error surfaced by the test — not a test-side timing issue.

Phase 4 — Fix. The fix belongs in the product. Route to the owning team with the evidence; the test stays as a regression guard.

Decide test-side vs product-side fix explicitly. A product bug should not be papered over in the test.

Phase 5 — Prevention. Keep the test as a guard and add a targeted test around the fixed behavior.


Example 3 — Non-reproducible failure

Symptom: a failure appeared in CI once, with an incomplete log, and could not be reproduced after several attempts.

Phase 1 — Triage. Cannot be reproduced after a bounded number of attempts with varied conditions. Do not force a label. Record it as non-reproducible, capture partial evidence (run id, partial log, environment snapshot), and note the suspected nature (e.g. infrastructure or environment).

Phase 2–5. Because there is no reproduction and no confirmed cause, do not fabricate a root cause. Escalate or flag for observation, and record the decision and reason so the effort is not lost.

Outcome: documented as non-reproducible with suspected nature and an escalation path, rather than a guessed answer.


Using the files with these examples

Each example above would populate qa_investigation_plan.md, qa_investigation_findings.md, and qa_investigation_progress.md following the templates. Do not invent a root cause for a failure you could not reproduce.

Source: SKILL.md on GitHub

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides a structured methodology for investigating test failures, emphasizing persistence and evidence collection. It includes clear instructions to redact sensitive data like credentials and PII, which is a security best practice. No malicious code or exfiltration patterns were detected.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at bfc4714. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated last month

README badge

README badge for fugazi/test-automation-skills-agents/qa-investigation