Which questions to clarify at the start
At the start you clarify the variables the design depends on: scale, the time target, teams, environments and external dependencies. For a backend task you ask about load, consistency versus availability and delivery guarantees in a queue. Four to six questions are enough, each answer must change the solution, and when there is no answer the assumptions are stated aloud with numbers.
System design · How to answer
You are told «design a framework». Which questions to ask so you do not have to guess?
«Design a framework». A candidate who answers this with no questions has to guess: how many tests, how many people, what the infrastructure has. If the guess is wrong, every later decision is built on sand, and the interviewer sees only that the candidate does not know how to turn a request into a task. That is exactly why the first five minutes matter most. This lesson covers which questions to ask, why there should be few and what to do when there is no answer.
How it works and why. A question is not for politeness but to pin down the variables the design depends on. Each answer must directly change a decision: the number of tests and the time target determine workers and shards, the number of teams decides whether a shared core is needed, the presence of ephemeral environments decides the data and isolation strategy, external dependencies decide what to mock and what to run against a sandbox.
A question changes the design
For a test-system task the questions are: how many tests there are now and in a year, which types (unit, API, e2e); the time target (PR feedback in 10-15 minutes or a nightly run); how many teams write tests and whether it is one repository; which environments exist (local, ephemeral per PR, staging); which external dependencies (a payment provider, KYC, bank APIs) and whether they have a sandbox; the CI budget.
For a backend task they differ: the load (RPS, peaks, growth); what matters more, consistency or availability (for an account balance usually consistency: better to refuse than to show a wrong amount); the delivery guarantees of the queue (at-least-once means possible duplicates, so the consumer must be idempotent); whether there are regulator requirements: audit, data retention, PCI DSS. These are not decoration either: the answer about delivery decides which message-replay tests are needed.
Which questions to ask
Changes nothing
«What is your stack?», «Which browser?», «Are there quality requirements?». The answer does not move the design, and the last one is obvious.
Moves the decision
«How many tests and what is the PR feedback target?», «Are there ephemeral environments?», «Does the payment provider have a sandbox?». Each answer changes a layer.
Example: what to do when there is no answer. The interviewer often says: «Decide yourself». It is not a trap, it checks whether you can work under uncertainty. The action is simple: say the assumptions aloud, briefly, with numbers, and fix them as support. Below is how it sounds:
I fix the assumptions:
- 2000 e2e, ~20 s each
- target: PR feedback in 15 min
- 4 teams, one monorepo
- staging exists, no ephemeral environments
- the payment provider has a sandbox
If something is off, tell me and I will recalculate.
Why this variant is good: the numbers are picked so they are easy to calculate (2000 tests of 20 seconds in 15 minutes gives about 45 parallel slots), the assumptions cover scale, teams, environments and dependencies, and the last sentence leaves the interviewer room to correct. After that you refer to these numbers instead of inventing new ones on the way: the calculations stay consistent from start to end.
Limits and alternatives. Do not ask all the questions at once: pick the 4-6 most important, write the answers down (on the board or in your head) and refer to them. A long interrogation tires and eats time, but too few questions looks like guessing. The interviewer may answer partly or answer with a question: that is a sign the number is not critical, not a reason to get stuck. A «which stack» question is fine if it has a reason («Playwright is already there, or are we choosing?»); without a reason it shows only a habit.
Common mistakes.
- Asking no questions: decisions become guessing, and the interviewer does not see how you work under uncertainty.
- Asking a dozen questions in a row: time goes, and you have not shown you can prioritise.
- Asking what changes nothing: «which browser?» with no reason, when the point is scale.
- Hearing the answer and not using it: nothing changed in the design, as if the questions were a ritual.
- Silently inventing numbers: the interviewer does not know your assumptions and cannot correct them.
Check yourself
The interviewer answered «decide yourself» to your question about the number of tests. What do you do and why not just start designing?
Answer
I say an assumption aloud with numbers (for example 2000 tests of 20 seconds, a 15-minute target) and fix it as support. If assumed silently, the interviewer cannot see what the calculations rest on and cannot correct it, which could shift the whole design. Said aloud, the assumption can be checked.
Which decision does the answer «the queue guarantees at-least-once» change, and why?
Answer
At-least-once means a message may arrive twice. The consumer must be idempotent (a repeated processing must not debit twice), and the tests need a redelivery scenario. Without it the system may duplicate operations, and a test with a single delivery will not show this.