All jobs / Automation developer / Framework Design
Automation developer interview question · 3–5 years
Your framework offers per-test, per-file and per-run fixtures. Setting up a tenant takes thirty seconds; signing a user in takes two.
How do you decide the scope of each fixture?
The strongest answer
Run scope only for things that stay read-only and are expensive, like the tenant; test scope for anything a test mutates, like the user and its data. A shared fixture that is ever written to is the next order-dependent failure
Why it works
Exactly — the question is not speed, it is whether anything writes to the shared thing.
What a good answer covers
- Share only what stays read-only.
- Mutated state is per-test, always.
- Cost decides what is worth sharing.
- A written shared fixture is a future flake.
Answers that fall short
- Close, but not the strongest: Put the slow setup at run scope and everything else at test scope, to keep the suite fast
The right shape; the rule that makes it safe is read-only, and an interviewer wants to hear it. - Weak: Everything at run scope, with each test cleaning up after itself so nothing leaks
Cleaning up afterwards does not help the parallel test that read the value mid-change. - Red flag: Everything at test scope — isolation matters more than runtime, whatever that costs
Defensible, and at thirty seconds a tenant it prices your suite out of the pull request.
Who gets asked this
More Framework Design questions
- A feature flag is off in staging and on in the PR preview. How do tests cope?
- Six squads share your framework, and every triage starts with somebody rerunning the test locally with extra…
- What does a test-platform team ship?
- A vendor wants all oracles inside their cloud recorder. What do you keep local?
- What does a paved road for tests look like on day one of a new service?
- Give the one sentence you want every squad to say about test platform.
- Someone opens the test report at eight in the morning. What questions does it have to answer?
- How do you get a user into “has items in cart” for a test?