All jobs / Automation developer / Automation Fundamentals
Automation developer interview question · 1–3 years
When do you stub the payment API in a UI test?
The strongest answer
When you are proving the shopper path, not the acquirer — keep a separate sandbox test that really charges a test card
Why it works
Exactly. Stubs are honest when they name what they skip. You still owe a real-money sandbox somewhere.
What a good answer covers
- Stub the shopper path on purpose.
- Keep a real sandbox somewhere.
- Name what the stub skips.
- Do not stub production.
Answers that fall short
- Close, but not the strongest: Always; real APIs make tests slow so I stub everything forever
Stub-everything is how the acquirer drift surprises you. - Weak: Never; stubs are lies
Never-stub makes a slow, flaky money pack. - Red flag: I stub production and hope nobody notices
Stubbing production is a red flag.
Who gets asked this
More Automation Fundamentals questions
- The UI pack is 70% of runtime and finds 10% of bugs. What do you do?
- How do you talk about flakes with a director?
- People rerun the PR pipeline “until green.” What do you change?
- What is a fair quarantine SLA for a money-path flake?
- What does a good flake RCA fit on?
- A “common” UI pack has no squad name on it. What happens next?
- You are asked for a two-year automation strategy. What are the first three pages?
- How do you defend a thin UI pack to a board that wants “what users see”?