Interview Prep/CI/CD/Metrics, Performance and Cost

How do you speed up test suites that take 30+ minutes?

IntermediateProductionMetrics, Performance and Cost
Answer

Run tests in parallel on a machine (pytest -n auto, go test -p, JUnit parallel forks), shard across runners using historical timing, run affected tests only (test impact analysis, Nx/Bazel), replace slow E2E with API-level or contract tests, use in-memory or Testcontainers databases with reuse, avoid sleep waits, and move rare slow tests to nightly. Keep a time budget per suite and watch it like any other SLO.

All CI/CD questions

More on Metrics, Performance and Cost