SDET Interview Preparation
With three to five years of experience, automation interviews change. Nobody asks you to define the Page Object Model any more — they ask why you chose it, what went wrong and what you'd do differently. This guide covers what interviewers expect at mid-level, every round with model answers, the coding and SQL you must be able to write, and a two-week plan.
What Changes at 3–5 Years?
| Early-career interviews | Mid-level SDET interviews |
|---|---|
| Definitions — "What is POM?" | Design decisions — "Why did you choose POM? What are its drawbacks?" |
| Syntax | Trade-offs and architecture |
| Individual concepts | A complete framework walkthrough |
| Writing scripts | Ownership, mentoring, CI/CD and production problems |
The biggest shift: interviewers already assume you can write automation. They want evidence that you can design solutions, own framework decisions, solve production problems, mentor others and improve quality. Every technical answer should include a real example from your project.
The Six Interview Rounds
| Round | What it evaluates | Prepare with |
|---|---|---|
| 1 | Automation framework ⭐ | Explain Your Automation Framework |
| 2 | Selenium / Playwright depth | Top 50 Selenium Questions |
| 3 | Java coding ⭐ | Java Coding Programs Guide |
| 4 | API testing and SQL | API Questions · SQL Questions |
| 5 | Scenario and ownership | Scenario-Based Questions |
| 6 | HR — expectations, notice period | HR Interview Guide · Salary Negotiation |
Round 1 — Automation Framework ⭐
For most mid-level interviews, this is the round that decides the outcome. Interviewers want a clear explanation — not a memorised script — and they will interrupt with follow-ups.
A 90-Second Framework Walkthrough
"Our framework is a hybrid framework built with Selenium 4, Java, TestNG and Maven, using the Page Object Model. Page classes hold locators as By objects and page actions; test classes contain only test logic and assertions. A base test handles browser setup through a ThreadLocal driver factory, so we can run in parallel. Test data comes from JSON files and TestNG data providers, and configuration for each environment comes from property files, selected with a Maven parameter. We use Extent Reports with screenshots on failure. The suite runs in Jenkins — smoke tests on every merge and full regression nightly on a Selenium Grid in Docker. One challenge was flaky tests in CI; we fixed most of them by setting a fixed headless window size, replacing sleeps with explicit waits and making test data independent, which brought our failure rate down significantly."
Replace every detail with your own — and be ready to go deeper on any sentence.
Follow-Up Questions and How to Answer Them
| Question | Strong answer includes | Revise |
|---|---|---|
| Where do you use inheritance and encapsulation? | BaseTest/BasePage inheritance; private locators with public page methods | OOP in Your Framework |
| Which collections do you use, and why? | List for element lists, Map for test data and config, Set for window handles | Collections in Your Framework |
| How do you run tests in parallel safely? | ThreadLocal driver, independent data, TestNG parallel settings, Grid | Parallel & Grid |
| How do you manage test data? | External files, API-created data, unique values, clean-up | Data-Driven Testing |
| Why POM? What are its downsides? | Maintainability; downsides are boilerplate and large page classes — solved with components | Frameworks & POM |
| How do you decide what to automate? | Stable, repeated, high-risk, data-heavy flows; not one-offs or fast-changing UI | Automation Decisions |
Go deeper with The Complete Automation Framework Guide.
Round 2 — Selenium Depth
At this level, expect "why" and "what went wrong" questions rather than commands:
| Topic | Why it's asked |
|---|---|
| Wait strategies | Test stability — and why you never mix implicit and explicit waits |
| StaleElementReferenceException | Whether you understand the DOM |
| Dynamic locators and XPath axes | Real project experience |
| Windows, frames and alerts | Handling difficult UI |
| CI-only failures | Ownership of the pipeline |
| Selenium Grid | Cross-browser and parallel execution at scale |
Many companies now ask about Playwright too — know when you'd choose each. See Selenium vs Playwright.
Round 3 — Java Coding ⭐
Coding is still a major elimination round for experienced candidates. Practise without an IDE.
| Program | Expected approach |
|---|---|
| Reverse a string | StringBuilder, or a manual two-pointer swap |
| Second largest number | Single pass, O(n) |
| Remove duplicates | LinkedHashSet (keeps order) |
| First non-repeating character | LinkedHashMap counts |
| Palindrome | Two pointers |
| Pair with given sum | HashSet complement lookup |
| Character frequency | HashMap with merge() or getOrDefault() |
| Anagram | Character counts, O(n) |
| Missing number | Sum formula n(n+1)/2 |
While solving: write it yourself, explain your logic aloud, give the brute-force and optimised approaches, and state time and space complexity.
Tested solutions: Top 30 SDET Coding Questions · Java Coding Programs Cheat Sheet.
Round 4 — API Testing & SQL
API Topics
Status codes (cheat sheet), 401 vs 403, 500 vs 503, PUT vs PATCH, idempotency, authentication, API chaining, and REST Assured vs Postman.
Be ready to design test cases for an endpoint on the spot.
SQL You Must Be Able to Write
3rd highest salary — handles ties
SELECT name, salary
FROM (
SELECT name,
salary,
DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk
FROM employees
) ranked
WHERE rnk = 3;
Simpler version without window functions
SELECT DISTINCT salary
FROM employees
ORDER BY salary DESC
LIMIT 1 OFFSET 2;
Find duplicate records
SELECT email, COUNT(*) AS occurrences
FROM users
GROUP BY email
HAVING COUNT(*) > 1;
Also know INNER vs LEFT JOIN and WHERE vs HAVING.
More: Top 25 SQL Questions for Testers.
Round 5 — Scenarios & Ownership
| Scenario | What to demonstrate |
|---|---|
| Flaky tests | Root-cause analysis, not retries |
| A production defect you missed | Investigation and prevention |
| Requirement changes late in a sprint | Impact analysis and re-prioritisation |
| A developer rejects your bug | Evidence and communication |
| Regression takes too long | Prioritisation, parallelism, moving checks to the API layer |
| Estimating automation effort | Planning and assumptions |
| Mentoring a junior | Code reviews, pairing, framework conventions |
Answer With STAR — A Worked Example
- Situation: "Our nightly regression of about 400 UI tests took over 6 hours and often failed in Jenkins."
- Task: "I was asked to make it reliable enough to run before every release."
- Action: "I moved the driver to a ThreadLocal factory and enabled parallel runs on a Dockerised Grid, replaced fixed sleeps with explicit waits, and moved data set-up from the UI to API calls."
- Result: "The run dropped to under 90 minutes and CI-only failures became rare, so the team started trusting the results."
Use your own numbers — interviewers remember measurable results.
Two-Week Preparation Schedule
| Days | Focus |
|---|---|
| 1–2 | Framework walkthrough — say it aloud until it's natural; prepare follow-ups |
| 3–4 | Selenium depth and your CI setup |
| 5–7 | Java coding ⭐ — 3–4 programs a day, timed |
| 8–9 | API testing, REST Assured and SQL |
| 10–11 | Four STAR stories: flaky tests, a production bug, a disagreement, an improvement you led |
| 12 | Git, Jenkins and your project walkthrough |
| 13 | Two mock interviews — try the Mock Interview Practice tool |
| 14 | Company-specific preparation and the night-before plan |
Five Reasons Mid-Level Candidates Get Rejected
- They can't explain their own framework beyond the folder names.
- Weak coding — years of automation, but can't write a HashMap-based program without an IDE.
- No measurable results — "we improved stability" instead of numbers.
- UI-only experience — no API, SQL, Git or CI/CD depth.
- Memorised answers that fall apart at the first follow-up question.
Questions to Ask the Interviewer
- "What does your current automation framework look like, and what would you change about it?"
- "How are automated tests run in your release process?"
- "What's the biggest quality challenge the team is facing right now?"
From Real Projects
At around four years of experience — as a Software Test Engineer at Voltstream Technologies and an Automation Test Engineer at WizzyBox — interviews expect you to talk about real projects, not just definitions. Be ready to explain the application (for me: Apkope, Canolog and Testsigma), your framework (Selenium with Java and TestNG, POM and a business library, Excel data with Apache POI), how you ran tests (batch, group, parallel, cross-browser) and how you worked in Agile ceremonies. Prepare one example for each and practise saying it in two minutes.
Frequently Asked Questions
What do interviewers expect from an SDET with 3–5 years' experience?
Framework design and ownership, strong Java coding, API and SQL skills, CI/CD experience, and real examples of solving problems like flaky tests and production defects.
How should I explain my framework?
Type and stack, structure, execution, test data, reporting, CI/CD — then one real challenge you solved. Keep it to about 90 seconds and let the interviewer ask for detail.
Is coding really that important at mid-level?
Yes. It's one of the most common elimination rounds. Practise array, string and HashMap programs without an IDE, and always discuss complexity.
Do I need Playwright as well as Selenium?
Not always, but knowing when you'd choose each — and having tried Playwright — is increasingly expected.
How do I answer scenario questions?
Use STAR — situation, task, action, result — with a real example and a measurable outcome.