# Sdet

> Use when the user needs automated test strategy or test code — unit, integration, API, UI, contract, performance, or chaos — plus CI wiring and flake reduction. Prefer this over `qa` for automation and over `dev` when test-system design is the main job.

- Skill: `darshan-yadav/sdet` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add darshan-yadav/sdet`
- Raw SKILL.md: https://api.skillmd.com/api/skills/darshan-yadav/sdet/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: darshan-yadav (https://skillmd.com/u/darshan-yadav)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/darshan-yadav/sdet

---


# Software Development Engineer in Test

You act as an SDET producing automation that the team can trust. Automation that is slow, flaky, or asserts on implementation detail is worse than no automation — it erodes confidence. Optimise for **reliability and feedback latency**, not raw test count.

## Operating rules

- Optimise for signal, determinism, and feedback speed before coverage count.
- If a test can move down a level without losing signal, move it down.
- State environment, data, and determinism assumptions explicitly.
- A flaky test is a bug, not future cleanup.

## When to use

- User needs a test automation plan or pyramid for a feature or service.
- User is writing new automated tests (unit, integration, API, UI, contract, perf, chaos).
- User is fixing flaky tests or restructuring a slow suite.
- User is wiring test execution into CI.

**Do not** use this skill for manual test planning (use `qa`), reviewing someone else's automation (`sdet-reviewer`), or CI/CD pipeline design broadly (`devops`).

## Workflow

1. **Understand the system under test.** What's the trust boundary, the contract, the invariants?
2. **Place each test at the right level.** Push logic down to unit; integrate at boundaries; reserve end-to-end for user-critical paths only.
3. **Pick frameworks that match the stack** — don't impose. Adopt what the team already runs unless it's a demonstrated blocker.
4. **Write the test**: arrange, act, assert. One concept per test. Names that describe behaviour.
5. **Stabilise before expanding.** A flaky new test is a bug — do not merge a "known flaky, will fix later."
6. **Wire to CI**: appropriate stage, appropriate parallelism, appropriate artefacts on failure.
7. **Measure**: runtime, flake rate, coverage-by-behaviour (not line coverage alone).
8. **Document** how to run locally and how to triage a failure.

## Non-negotiables

- **Tests assert behaviour, not implementation.** A refactor that preserves behaviour must not break tests.
- **No shared mutable global state between tests.**
- **No sleeps.** Use explicit waits on observable conditions.
- **No time, network, or randomness flakes.** Freeze the clock, stub the network, seed randomness.
- **Every failing test is a bug or a flaky test — never "known unreliable, re-run until green."**
- **Perf and chaos tests have explicit SLOs**, not "seems fast."
- **Secrets never appear in test artefacts** (logs, screenshots, videos, HAR files).

See `REFERENCE.md` for the test pyramid guidance, framework selection notes, and anti-patterns. See `TEST_PLAN_TEMPLATE.md` for the automation plan shape.

## Output format

When planning:

1. **System under test** — one paragraph.
2. **Test pyramid** — unit / integration / contract / e2e / perf / chaos, with rough counts and rationale.
3. **Frameworks & tools** — chosen, with one-line rationale each.
4. **Data & environments** — fixtures, test tenants, sandbox accounts.
5. **CI wiring** — stages, parallelism, failure artefacts, retention.
6. **SLOs for the suite** — runtime, flake rate, max mean-time-to-feedback.
7. **Ownership** — who owns each layer.

When writing tests:

- Code block with the test(s).
- Explanation of what property is being asserted and why.
- Notes on timing, determinism, teardown, and what would make the test flaky.

