Owns the test architecture across services and UI, designs scalable frameworks, sets up contract and API testing, optimises pipelines for speed and reliability, and mentors other engineers. Interviews include system-level design of a test platform, parallel execution and environments, contract testing, debugging hard CI failures and leadership scenarios, plus a Java coding round.
Test architecture Contract testing Pipeline optimisation Advanced Java Mentoring
Solved for this roleStart 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.
A callback where one system sends an HTTP request to another when an event occurs. Test with a mock receiver or tools such as webhook.site and verify the payload.
02
How do you test an API that depends on another service that is down?
Use git revert <commit>, which creates a new commit that reverses the changes and keeps history intact, safe for shared branches. git reset moves the branch pointer backwards and is fine for local commits, but resetting and force-pushing a shared branch rewrites history and breaks teammates' clones. If force push is truly needed, use --force-with-lease and tell the team.
04
Describe a situation where automation was not the right answer.
Situation: a manager wanted a one-time data migration check automated in Selenium. Task: give an honest recommendation. Action: I estimated the UI automation effort, showed a SQL comparison plus a manual sample check would finish in a day, and explained the flows would not repeat. Result: we finished faster, and the team now asks for ROI reasoning before automating.
05
Your 200 mobile tests across six devices take too long to finish. How would you speed them up?
Run devices in parallel with one thread per device, each with its own udid, systemPort or wdaLocalPort. Use deep links or API calls to reach the screen under test instead of navigating through the UI every time. Prefer noReset with explicit data cleanup over reinstalling the app. Replace XPath with accessibility ids. Split the suite so pull requests run a small smoke set on emulators while the full device matrix runs nightly.
06
What are the advantages of version control for test code?
Separate concerns: for most functional tests, stub the payment API with WireMock returning success, failure and timeout responses, so tests are fast and deterministic. Keep a small set of integration tests against the sandbox, with longer timeouts and retries for network errors, run on a schedule. Report sandbox slowness separately so it does not block every pull request.
08
What is the Screenplay pattern and how does it compare to POM?
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.
Generally no. Page objects should expose state and actions, such as getErrorMessage() or isLoggedIn(), and tests should make the assertions. This keeps page classes reusable across positive and negative tests and keeps the test intent visible. A small exception is a simple check that the correct page has loaded, often done in the constructor or an isAt() method.
10
Describe a time you convinced developers to fix a problem found by automation.
Situation: an API test kept failing intermittently and developers called it a test issue. Task: prove or disprove it. Action: I collected logs from ten failures, showed the same race condition in the order service with request IDs, and reproduced it with a small parallel script. Result: developers fixed a real concurrency bug before it reached customers, and trust in the suite improved.
Create a base module with shared specs, auth handling, config per environment, filters for logging and reporting, and utilities. Each service gets its own client class wrapping endpoints and POJOs for its models. Tests call clients, never raw URLs. Use builders for test data, schema checks for contracts, tags to run per service, and run independent services in parallel in CI.
13
What is idempotency in REST APIs and why does it matter for testing?
An idempotent operation gives the same result no matter how many times it is called. GET, PUT and DELETE should be idempotent; POST usually is not. Testers verify that repeating a PUT does not create duplicates and that a second DELETE returns a sensible status like 404 or 204. Retries in networks and CI make idempotency important to verify.
Put explicit waits in page methods or BasePage helpers, not in tests. For example click() waits for elementToBeClickable before clicking, and a page's isLoaded() waits for a key element. Avoid Thread.sleep and avoid mixing implicit and explicit waits. Keep the timeout configurable so CI can use a slightly longer value than local runs.
15
How do you verify that the correct page has loaded in POM?
Give each page an isAt() or waitUntilLoaded() method that waits for a unique element, page title or URL fragment. Call it in the constructor or right after navigation. If it fails, throw a clear error such as "Expected Cart page but URL was /login". This catches navigation problems at the right point instead of failing later with a confusing locator error.
16
How would you design a CI pipeline for nightly regression?
Schedule the job, spin up environments or containers, run suites in parallel, store reports and screenshots, notify failures on Slack or email and track trends.
17
Your API tests started failing with SSL handshake errors on a new test server. What do you do?
First confirm the server uses a self-signed or internal certificate. The proper fix is to import the company CA certificate into a truststore and configure REST Assured with trustStore(path, password). As a temporary measure in a test environment only, relaxedHTTPSValidation() skips checks. Never use relaxed validation against production, and raise the certificate issue with the infra team.
18
What are Maven profiles and how do you use them in automation?
Profiles are sets of configuration activated by name, such as -Pqa or -Pstaging, or by conditions. In automation they switch environment URLs, suite files, browsers or parallel settings without changing code. For example a regression profile sets suiteXml to regression.xml and threadCount to 4. Combined with properties files, profiles keep one codebase for every environment.
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
How do you test page objects themselves, or keep them reliable?
Page objects are tested indirectly through a smoke suite that exercises each page method at least once. Keep them simple with no logic beyond waiting and interacting. Add clear error messages in waits, log each action at debug level, and run the smoke suite on every pull request that changes framework code, so a broken page method is caught before regression runs.
GraphQL usually has one endpoint and you send a POST with a query and variables. Tests check the data returned matches the requested fields, that errors appear in the errors array, often with status 200, and that authorization applies per field. Also test query depth limits and nested queries for performance. REST Assured works fine by sending the query as JSON body.
22
Nightly Jenkins regression runs take 4 hours. How would you bring it down?
Measure first: find the slowest tests and setup steps. Then run tests in parallel across Grid nodes or containers, replace UI setup with API calls, remove duplicate coverage, move checks down to API level, split the suite into shards across agents, and cache Maven dependencies. Aim for a smoke stage under 15 minutes on every commit and a parallel regression under an hour.
23
How do you store passwords and tokens safely in Jenkins?
Use the Jenkins Credentials store and bind them in the pipeline with withCredentials or the credentials() helper in environment blocks. Jenkins masks the values in console logs. Never hard-code secrets in the Jenkinsfile, pom.xml or properties files committed to Git. For larger setups, integrate a vault service and give each job only the credentials it needs.
24
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.
25
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.
26
How do you handle pressure when management wants 100 percent automation coverage?
Situation: leadership set a goal to automate every manual test case. Task: set realistic expectations. Action: I analysed the cases, showed that some were one-time, visual or exploratory, and proposed covering critical and repetitive flows first with a clear ROI estimate. Result: we agreed on 80 percent of regression cases, delivered it on time, and kept exploratory testing manual.
27
Developers changed a field from a number to a string and your tests did not catch it. How do you prevent this?
Add JSON schema validation for key responses so type changes fail immediately, and deserialize into typed POJOs, which fail when types do not match. For services with multiple consumers, introduce contract tests so providers learn about breaks before deploying. Also ask for API changes to be shared in pull requests or a changelog that QA reviews.
28
How do you build dynamic JSON request bodies without hard-coded strings?
Use POJOs with a builder pattern or Lombok @Builder, so tests write User.builder().name("Ravi").role("QA").build(). For quick cases use a HashMap or Jackson ObjectNode. For large templates, keep a JSON file and change fields with a JSON library. Combine with a faker library for unique values. This avoids escaping issues and makes changes to the schema easy to update.
29
What metrics do you track for test automation in CI/CD?
Useful metrics are pass rate per run, flaky test rate, average and slowest test duration, pipeline time to feedback, defects caught by automation versus escaped to production, automation coverage of critical flows and time spent on maintenance. Trend them over weeks. Metrics should drive action, such as fixing the top flaky tests, not just fill dashboards.
30
How would you design an automation framework from scratch?
Code pushed to Git → Jenkins job triggers (webhook or schedule) → mvn clean test with the suite XML → reports and screenshots published → notifications on Slack/email → failures triaged before release.
32
You join a project where tests call driver.findElement directly everywhere. How do you move to POM?
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.
33
Tell me about a time your API tests caught a breaking change before the UI tests did.
Situation: a backend team renamed a response field during a refactor. Task: our nightly REST Assured suite had to protect the mobile and web clients. Action: schema validation failed within minutes of the merge, and I shared the failing response and the contract with the developer. Result: the field was restored with a deprecation plan before the UI suite even ran, and the team added our schema tests to their pull request checks.
34
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.
35
How do you handle a component that appears inside many different pages, like a modal dialog?
Create a ModalComponent class scoped to the modal root element, with methods like title(), confirm() and cancel(). Pages that open modals return the component, such as cartPage.removeItem() returning ConfirmModal. The component waits for itself to appear and disappear. This keeps modal logic in one place and avoids copying locators into every page.
Read the documented limit, then send requests quickly until you exceed it and assert a 429 Too Many Requests response with headers like Retry-After or remaining quota. Wait for the window to reset and confirm requests succeed again. Also check limits are per user or key as designed. Run these tests in isolation so they do not throttle the rest of the suite.
A parent pom lists modules that share dependency versions through dependencyManagement and plugins through pluginManagement. In automation you might have core-framework, ui-tests, api-tests and performance modules. Teams can run or release modules separately, and shared code lives in one place. It is worth it when several teams or test types share the same framework.
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.
40
How do you validate a response against a JSON schema in REST Assured?
Add the json-schema-validator dependency, place the schema file in src/test/resources, and assert with then().body(matchesJsonSchemaInClasspath("user-schema.json")). Schema validation checks field types, required fields and structure, so it catches contract changes that value checks might miss. It complements, not replaces, assertions on business values like status or totals.
Frequently asked questions
What does a Senior SDET do?
Owns the test architecture across services and UI, designs scalable frameworks, sets up contract and API testing, optimises pipelines for speed and reliability, and mentors other engineers. Interviews include system-level design of a test platform, parallel execution and environments, contract testing, debugging hard CI failures and leadership scenarios, plus a Java coding round.
Which skills are tested in a Senior SDET interview?
Expect questions on Test architecture, Contract testing, Pipeline optimisation, Advanced Java, Mentoring. Most rounds also ask you to explain a project and solve one practical problem live.
How do I prepare for a Senior SDET interview?
Revise Page Object Model, API Testing and CI/CD, REST Assured, Git, Maven and Jenkins first using the topic sheets, practise the questions on this page aloud, then do one full mock interview to practise timing.