All jobs / Automation developer / Framework Design
Automation developer interview question · 0–1 years
How do you get a user into “has items in cart” for a test?
The strongest answer
Create that state through an API, a factory, or a seed I own — I do not click the whole catalogue every run to reach the page I care about
Why it works
Exactly. Setup is data work. The UI test starts at the risk.
What a good answer covers
- Seed state cheaply.
- Start the UI at the risk.
- Do not share one row.
- Never use prod accounts.
Answers that fall short
- Close, but not the strongest: Always click from the homepage so it is “realistic”
Realistic is a sample, not a tax on every case. - Weak: Share one cart id in a global variable the whole suite uses
A shared cart is how parallel jobs collide. - Red flag: Use a production account the intern mailed me
Prod credentials in a test are a leak.
Who gets asked this
More Framework Design questions
- A spec file contains a staging password. What do you do?
- What is Given / When / Then for in an automation suite?
- Where do base URLs, users, and feature flags for tests live?
- A teammate wants the suite’s test data in a spreadsheet so “anyone can add a case”, starting with 400 rows…
- Three squads share checkout steps and each forked a page object. What do you introduce?
- Your framework offers per-test, per-file and per-run fixtures. Setting up a tenant takes thirty seconds…
- 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…