System Design for SDET Interviews: How to Design a Test Infrastructure From Scratch
Senior SDET interviews have a round most candidates are not prepared for: system design. Not application system design — test infrastructure design. “Design the automation strategy for an e-commerce platform.” Here is how to ace it.
Contents
The 5-Step Framework
Step 1: Clarify Requirements (2 minutes)
Ask: How many microservices? What is the deployment frequency? What is the current team size? What testing exists today? What is the biggest quality pain point?
Step 2: Define the Test Pyramid (3 minutes)
| Layer | What | Tool | Count | Speed |
|---|---|---|---|---|
| Unit | Functions, classes | Jest/pytest | 1000+ | Seconds |
| Integration | Service boundaries | Testcontainers | 200-500 | Minutes |
| Contract | API agreements | Pact | 50-100 | Seconds |
| E2E | Critical user flows | Playwright | 50-100 | Minutes |
| Performance | Load/stress | k6 | 10-20 | Minutes |
Step 3: Design the Pipeline (5 minutes)
Draw the CI/CD flow: commit gate (lint + unit, 2 min) → PR gate (integration + contract, 10 min) → merge gate (E2E parallelized, 15 min) → nightly (full suite + performance + security).
Step 4: Address Test Data (3 minutes)
Explain: API-based test data creation (not UI), test isolation for parallel execution, Testcontainers for disposable databases, factory patterns for consistent data generation.
Step 5: Discuss Observability (2 minutes)
Allure for reporting, Grafana for test metrics dashboards, Slack notifications for failures, release confidence scoring.
Common Design Questions
- “Design automation for an e-commerce platform with 15 microservices”
- “How would you test a payment gateway integration?”
- “Design a test strategy for a mobile app with API backend”
- “How would you handle testing across 3 environments (dev/staging/prod)?”
- “Design a monitoring strategy to catch production issues before users report them”
