Automation Testing Interview Questions for 10 Years Experience
40 questions with answers for candidates with 10+ years of experience — 10 medium, 30 hard.
What interviewers expect: 10 years experience
At ten years, interviews focus on quality leadership: building automation practices across an organisation, budgeting tools and infrastructure, hiring and growing teams, and aligning testing with business risk. Technical depth is still checked through architecture discussions, but the emphasis is on strategy, influence and measurable outcomes.
This set is weighted towards Selenium WebDriver (7), Performance Testing with JMeter (6), Cucumber and BDD (4), TestNG Framework (4).
Organisation-wide quality strategy Team building and hiring Automation infrastructure planning Business-aligned quality metrics
Solved at this levelStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
How do you handle authentication types in REST Assured?
Basic auth uses auth().preemptive().basic(user, pass). Bearer tokens are set as a header: header("Authorization", "Bearer " + token). OAuth 2.0 can use auth().oauth2(token) after fetching the token from the token endpoint. API keys go in a header or query param. Fetch tokens once per suite or cache them with an expiry check rather than logging in before every test.
02
What are Cucumber hooks and how are they different from Background?
Hooks are Java methods annotated with @Before, @After, @BeforeStep and @AfterStep that run around scenarios or steps. Background is visible in the feature file and describes business preconditions; hooks are hidden technical setup such as starting the browser, cleaning data or attaching screenshots. Hooks can be ordered with the order attribute and filtered by tag expressions, for example @Before("@ui").
03
What is the difference between @BeforeTest and @BeforeMethod?
First remove or disable GUI listeners like View Results Tree and run in non-GUI mode. Save results in CSV format with only needed fields instead of XML with response data. Increase heap through the HEAP environment variable, such as -Xms2g -Xmx4g, within the machine's RAM. Use Groovy instead of BeanShell, avoid huge regex extractions, and if one machine still cannot generate the load, distribute it across several workers.
05
Your UI regression suite has 15 percent flaky failures. How would you bring it under control?
Measure flakiness per test over many runs and fix the worst first. Typical fixes are replacing sleeps with explicit waits, creating independent test data via API, avoiding shared logins, using stable locators, isolating parallel drivers and stubbing unstable third parties. Quarantine known flaky tests into a separate job so they do not block releases, and set a target like under 2 percent.
06
How do you automate a two-factor authentication step in a test environment?
Do not try to read SMS from a real phone. Ask developers for a test-only approach: a fixed OTP for test users, a bypass flag in non-production, or an API to fetch the latest OTP. For authenticator apps, store the test account's TOTP secret and generate codes in Java with a TOTP library. Keep production 2FA untouched and secrets in the CI credential store.
07
You must read test data from a 50,000-row CSV for a data-driven test. How do you handle it efficiently in Java?
Do not load everything as one giant DataProvider; that creates thousands of UI tests. First question whether all rows need UI runs; most can be validated at API level. Read the file with BufferedReader or Files.lines() as a stream, filter to the rows you need, and use a lazy Iterator<Object[]> DataProvider so rows load as tests run, keeping memory low.
08
Tell me about a time you had to choose between Selenium and another tool for a project.
Situation: a new project team asked whether to keep Selenium or switch tools. Task: recommend an option with evidence. Action: I ran a two-week proof of concept automating the same five flows in both, compared stability, run time, team skills and Grid support, and shared the results. Result: we kept Selenium with Java for the existing team skills and Grid setup, and adopted better waits and parallel runs from the trial.
09
Which tests should run at each stage of a CI/CD pipeline?
On every commit or pull request: unit tests, static checks and a fast API and UI smoke suite. After deploying to a test environment: broader API and integration tests. Nightly: full UI regression across browsers. Before or after production release: a short production-safe smoke and monitoring checks. Faster feedback first, heavier tests later.
10
What is the difference between open and closed workload models in load testing?
In a closed model a fixed number of users loop through the scenario, so when the server slows down, users wait and the arrival rate drops, which can hide problems. In an open model new requests arrive at a set rate regardless of response time, like real internet traffic, so a slow server builds a queue. JMeter thread groups are closed by default; the Open Model Thread Group or throughput timers approximate open workloads.
11
How do you manage test environments for a CI pipeline?
Keep environment details in config files or environment variables per env, never in code. Prefer ephemeral environments created per pull request with containers, seeded with known data and destroyed afterwards. For shared environments, reserve them through the pipeline, reset data before runs and monitor health with a pre-test check so tests do not fail due to a down service.
12
How do you run Appium tests in parallel on several Android devices?
Give each device its own session: unique appium:udid, a separate appium:systemPort for UiAutomator2 and, for hybrid apps, a separate chromedriverPort. Store the driver in a ThreadLocal so threads never share it. Pass device details through TestNG parameters or a DataProvider and run with parallel="tests", one test tag per device. One Appium server can handle several sessions, or use a Selenium Grid 4 with Appium nodes or a cloud device farm for larger matrices.
Situation: a release was blocked by failing tests and the manager wanted to know if it was safe to ship. Task: explain the risk without jargon. Action: I separated the failures into one real bug, where customers could be charged twice, and three environment issues. I showed the bug with a short screen recording. Result: the manager delayed the release by one day, the bug was fixed and the environment issues were assigned to DevOps.
15
How do you set up distributed load testing in JMeter?
One controller machine coordinates several worker machines that generate the load. On each worker start jmeter-server with the same JMeter and Java versions, place CSV files locally and open the RMI ports in the firewall. On the controller list the workers in remote_hosts in jmeter.properties, or pass -R host1,host2, and run in non-GUI mode with -r or -R. Remember that thread counts multiply per worker, so 100 threads on 4 workers gives 400 users.
@Factory creates test class instances dynamically, each with different constructor data, so all tests in the class run once per instance. For example a factory can create LoginTests for chrome and firefox. It differs from DataProvider, which runs one method many times with different arguments. Factory is useful when a whole class should repeat for each configuration.
17
Your load test showed good results, but production slowed down at the same traffic. What could explain the difference?
The test may not have matched reality. Common gaps are unrealistic think time or user journeys, repeated test data giving high cache hits, a smaller database than production, missing third-party calls that were stubbed, a test environment with different hardware or configuration, and load generated from one region. Review production logs and analytics to rebuild the workload model, use production-like data volumes and repeat the test.
18
How do you run JMeter tests in a Jenkins pipeline and fail the build when an SLA is breached?
Run JMeter in non-GUI mode in a pipeline stage, ideally inside a Docker image with a pinned JMeter version, and archive the JTL and HTML report. Enforce SLAs with Duration Assertions or a JSR223 check, or parse the JTL in a script that compares 95th percentile and error rate with thresholds and exits non-zero. The Jenkins Performance plugin can also mark builds unstable or failed based on thresholds and trends.
19
How do you run tests on multiple browsers in parallel in Jenkins?
Use a parallel block in the pipeline with a stage per browser, or a matrix directive with axis BROWSER values chrome, firefox and edge. Each branch runs mvn test -Dbrowser=${BROWSER}, ideally against Selenium Grid or containers so agents do not need local browsers. Publish results per branch with clear names so failures show which browser broke.
20
Your test framework leaks memory during long runs and Jenkins agents crash. How do you investigate?
Check whether drivers are always quit, ThreadLocal values are removed, and static lists or maps keep growing, such as collecting screenshots or response objects. Enable heap dumps with -XX:+HeapDumpOnOutOfMemoryError and analyse with a tool like VisualVM or Eclipse MAT to see which objects hold memory. Fix the leak and tune Surefire's forked JVM memory with argLine if needed.
Headless mode or screen resolution, timing issues, environment data, missing dependencies, browser–driver version mismatch or parallel conflicts. Check logs and failure screenshots and make waits robust.
Automate stable, repetitive, high-risk and data-heavy flows (smoke, regression). Skip one-time tests, frequently changing UI and checks needing human judgement. Compare run frequency × manual time with build and maintenance cost.
I would not rewrite everything at once. First create the base structure: DriverManager, BasePage and config. Then pick the most-used flows, such as login and navigation, create page objects for them and migrate tests touching those pages. Agree that new tests must use POM, and migrate old tests when they are next changed. Track progress so the team sees improvement in maintenance time.
25
Your team has 600 Cucumber scenarios and step definitions have become a mess of duplicates. What do you do?
First run a report of step usage to find duplicate and unused steps. Agree a step vocabulary per domain, merge near-identical steps using parameters, and delete unused ones. Move logic out of steps into page objects and service helpers. Add a review checklist and a dryRun gate in CI. Do this incrementally by feature area so the suite keeps running while you clean up.
26
What are Java collections and which ones do testers use most?
ArrayList and LinkedList for lists, HashSet for unique values, HashMap for key-value test data, and Iterator for traversing them, for example collecting web elements in a list.
27
What is the Background keyword and when should you avoid it?
Background holds steps that run before every scenario in a feature file, such as opening the app and logging in. It removes repetition in Given steps. Avoid it when it becomes long, when only some scenarios need it, or when it hides important context, because readers then cannot understand a scenario on its own. In that case use a hook or a clearer Given step.
28
How do you test API security basics as an automation tester?
Check that endpoints reject missing or invalid tokens with 401, block users from other users' data with 403 or 404, validate input to prevent injection, do not leak stack traces or sensitive fields, enforce HTTPS and set security headers. Automate these as negative tests in the regression suite and work with the security team for deeper penetration testing.
29
A stakeholder asks whether the system can handle 10,000 users. How do you plan the performance test?
First clarify what 10,000 users means: concurrent sessions, users per hour or requests per second, and which journeys they perform. Use production analytics to build the workload mix and think times, then agree on SLAs like 95th percentile under two seconds and errors under one percent. Prepare a production-like environment and data, plan baseline, load, stress and soak runs, set up monitoring, and share a report with clear limits and bottlenecks.
In Dynamic Grid the node does not run browsers itself. It is configured with a Docker socket and a list of browser images, and for each new session it starts a fresh browser container, runs the test and then removes the container. Every test gets a clean browser, and capacity grows without pre-starting many nodes. It can also record video per session. The trade-off is container start-up time for each session.
Grid 4 is split into the Router, which receives all requests, the Distributor, which assigns new sessions to nodes, the Session Map, which records which node owns each session, the New Session Queue, which holds requests waiting for a free slot, the Event Bus, which lets components communicate, and Nodes, which run the browsers. In standalone or hub mode these run in one process, but they can also be deployed separately to scale.
With TestNG, extend AbstractTestNGCucumberTests and override scenarios() with @DataProvider(parallel = true), then set data-provider-thread-count. With JUnit 5, set cucumber.execution.parallel.enabled=true in junit-platform.properties. Each scenario must own its WebDriver, usually through a ThreadLocal or a per-scenario DI context, and test data must not clash. Parallelism is per scenario, not per step.
33
How do you test deep links in a mobile app with Appium?
On Android use the mobile: deepLink command with the URL and package, for example driver.executeScript("mobile: deepLink", Map.of("url", "shop://product/42", "package", "com.example.shop")). On iOS simulators driver.get with the custom URL opens it, though Safari may show a confirm dialog to handle. Then assert that the correct screen and data are shown. Deep links are also a great shortcut to reach deep screens quickly in other tests.
34
Tell me about a time you set up test infrastructure that other teams started using.
Situation: three product teams each kept their own unstable Grid VMs. Task: provide one reliable shared Grid. Action: I set up a Docker-based Grid with pinned images, health checks, video for failures and a short onboarding guide, then ran a pilot with one team and fixed their issues before opening it up. Result: all three teams moved within a quarter, VM costs dropped and Grid-related failures fell sharply.
35
What can testers do with Chrome DevTools Protocol support in Selenium 4?
Selenium 4 exposes CDP through the DevTools interface and the newer cross-browser BiDi APIs. Testers can capture console logs and JavaScript errors, intercept or mock network requests, emulate slow networks or geolocation, add basic authentication headers and collect performance metrics. CDP is Chromium-specific and tied to browser versions, so for long-term code prefer WebDriver BiDi features where available, and keep CDP usage behind a small helper class.
36
How do you prioritise when the release is tomorrow and many automated tests are failing?
Situation: 60 tests failed the evening before a release. Task: give a clear go or no-go input. Action: I grouped failures by root cause, found most came from one changed locator and one test data issue, fixed those first, and manually checked the three failures that pointed to real bugs. Result: I gave the lead a short report in two hours and one real defect was fixed before release.
37
An API test passes alone but fails when the suite runs in parallel. What could be wrong?
Likely shared state. Common causes are static RestAssured settings changed by one test, shared test data like the same user being updated by two tests, token reuse after another test logged out, or rate limits. Fix by using per-test RequestSpecification instead of global statics, creating unique data per test, isolating tokens, and checking server rate-limit responses such as 429.
38
Write Selenium code to verify that all links on a page are not broken.
Screenplay models tests around actors who have abilities (browse the web, call an API), perform tasks (place an order) made of interactions, and ask questions to verify state. It scales better for large suites because tasks are small, composable classes, whereas page objects can grow huge. It has a steeper learning curve, so POM with components is enough for most teams.
Compare effort saved by running automated tests repeatedly against the cost of building and maintaining scripts, counting execution time, defects found earlier and release speed.
Frequently asked questions
What is asked in Automation Testing interviews for 10+ years of experience?
At ten years, interviews focus on quality leadership: building automation practices across an organisation, budgeting tools and infrastructure, hiring and growing teams, and aligning testing with business risk. Technical depth is still checked through architecture discussions, but the emphasis is on strategy, influence and measurable outcomes.
How many questions should I practise before a Automation Testing interview?
Work through all 40 questions here, then the company-wise sets for the employers you are targeting. Quality matters more than count: be able to explain why each answer is right.
Which topics matter most for 10+ years of experience?
Focus first on Organisation-wide quality strategy, Team building and hiring, Automation infrastructure planning, Business-aligned quality metrics.