36 practice questions with answers for Automation Testing interviews in Delhi.
Automation Testing jobs in Delhi
Delhi NCR has one of India's biggest pools of IT, consulting, banking and start-up jobs. Delhi itself hosts many corporate, government-tech and consulting offices, and most candidates also apply across Noida and Gurgaon, so interviews here mix service-company and product-company styles.
Below are 36 questions that match the mix of service, product and domain employers hiring automation testers in Delhi.
Solved for DelhiStart 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 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.
02
Cucumber says a step is undefined even though the step definition exists. How do you fix it?
Check the glue path in the runner points to the package containing the step classes. Check the step text matches exactly, including quotes and parameter types, since {string} expects quoted text. Confirm the step class is under src/test/java and compiled, the annotation import is io.cucumber.java.en, and the Cucumber versions of core, java and the runner module match. Running with dryRun shows all unmatched steps quickly.
compile is the default and available everywhere. test is only for test compile and run, such as TestNG and REST Assured. provided is needed for compiling but supplied at runtime by the container. runtime is not needed to compile but needed to run, like JDBC drivers. system and import are rarer. In test projects, mark test libraries as test scope unless framework code in src/main uses them.
04
Explain the given-when-then structure in REST Assured.
given() sets up the request: headers, params, body, auth. when() performs the HTTP call such as get(), post(), put() or delete(). then() validates the response: status code, headers, body using Hamcrest matchers, and response time. You can call extract() after then() to pull values for later steps. The fluent structure reads like a test specification and keeps setup, action and checks clearly separate.
05
A test fails with TimeoutException waiting for an element that is clearly visible on screen. What do you check?
Check whether the element is inside an iframe or shadow DOM, the locator matches a different hidden element first, the page opened in a new tab not yet switched to, or the wait condition is wrong, such as presence versus visibility versus clickable. Use findElements to see how many matches the locator has and verify it in browser DevTools.
06
What is the difference between noReset and fullReset in Appium?
By default Appium clears app data between sessions but keeps the app installed. noReset set to true keeps app data and login state, which speeds up tests but can leak state between them. fullReset set to true uninstalls and reinstalls the app, giving the cleanest state but adding time. A common approach is noReset for fast suites with explicit cleanup in the test, and fullReset only for first-launch or onboarding scenarios.
07
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.
08
How do you capture a screen recording of a mobile test and attach it on failure?
// Start before the test, stop and save only if it fails
driver.startRecordingScreen();
// ... test steps ...
String base64 = driver.stopRecordingScreen();
if (result.getStatus() == ITestResult.FAILURE) {
byte[] video = Base64.getDecoder().decode(base64);
Files.write(Paths.get("target/videos/" + result.getName() + ".mp4"), video);
}
09
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.
10
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.
It occurs when one Gherkin step matches two or more step definitions, usually because of broad regular expressions or duplicate methods in different classes within the glue. Fix it by making expressions more specific, anchoring regexes with ^ and $, or removing the duplicate. Keeping step definitions organised by domain and reviewing new steps in pull requests prevents it.
13
Your CI pipeline is blocked because a downstream service needed for API tests is often down. What do you do?
Add a health check stage that pings dependencies before tests and marks the run as environment failure rather than test failure. For tests that do not need the real service, use stubs. Escalate with data on downtime frequency to the team owning the service. Keep a separate scheduled job for the real integration tests so pull requests are not blocked.
14
What is Appium and how does its architecture work?
Appium is an open-source tool for automating native, hybrid and mobile web apps on Android and iOS using the W3C WebDriver protocol. Your Java test sends HTTP commands to the Appium server, which forwards them to a platform driver such as UiAutomator2 for Android or XCUITest for iOS. That driver talks to the device and returns results. Because it follows WebDriver, Selenium testers can reuse locators, waits and framework design.
15
What does SE_NODE_MAX_SESSIONS control in the Docker Selenium images?
It sets how many browser sessions a node container can run at once. The default is one, which gives the best isolation and stability. Increasing it lets one container run several browsers in parallel, but you must also set SE_NODE_OVERRIDE_MAX_SESSIONS to true and give the container enough CPU, memory and shared memory. Many teams keep one session per container and scale the number of containers instead.
16
A utility method that parses dates from the UI breaks in parallel runs. What might be wrong?
It probably uses a shared static SimpleDateFormat, which is not thread-safe, so parallel threads corrupt each other's parsing. Replace it with java.time DateTimeFormatter, which is immutable and thread-safe, and LocalDate or LocalDateTime for values. Generally, avoid shared mutable static objects in test utilities that run in parallel.
17
Tell me about a time a CI pipeline you owned broke right before a release.
Situation: the night before release, every UI test failed in Jenkins. Task: find the cause fast and unblock the release. Action: I checked the console and saw a browser and driver version mismatch after an agent update, pinned the browser image version, reran the suite and shared a short note. Result: the release went out on time and we added image version pinning to the pipeline.
Gherkin is the plain-English language Cucumber uses to describe behaviour. Main keywords are Feature, Scenario, Given (precondition), When (action), Then (expected outcome), And/But (continuation), Background (common steps), Scenario Outline with Examples (data-driven), and Rule (groups scenarios under one business rule). Because it is readable by business analysts and testers alike, the feature file becomes living documentation as well as an executable test.
19
Some scenarios are still being developed and must not run in CI yet. How do you handle them?
Tag them, for example with @wip, and exclude the tag in the CI runner using a tag expression like not @wip, set through the cucumber.filter.tags property or the runner options. Developers can still run them locally by including the tag. Review @wip scenarios regularly so they do not stay parked forever, and never use the tag to hide failing tests that should be fixed or reported as bugs.
20
What is the difference between getText() and getAttribute()?
git cherry-pick <commit> applies the changes of one specific commit onto your current branch, creating a new commit. It is useful when a fix on one branch, such as a locator fix on develop, is urgently needed on a release branch without merging everything else. Overuse creates duplicate commits and confusing history, so prefer normal merges when possible.
22
What is the difference between @BeforeTest and @BeforeMethod?
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.
24
Write Java code to find duplicate elements in a list.
When a build is killed, driver.quit() never runs, so sessions stay open until the node notices. Set a sensible session timeout on nodes, such as SE_NODE_SESSION_TIMEOUT of 300 seconds, so idle sessions are cleaned up. Always call quit in an @AfterMethod with alwaysRun or a finally block. In CI, bring the Compose Grid up per build and tear it down in a post always step, so each build gets a fresh Grid.
27
Write a REST Assured POST test that sends a JSON body and checks the response.
Do not assert on positions when the API does not guarantee order. Use order-independent Hamcrest matchers such as hasItem, hasItems or containsInAnyOrder on the extracted field, for example body("name", hasItems("Pen", "Book")). Or use GPath filtering like find { it.id == 42 } to pick the right item before checking its fields. If order matters for the feature, raise it as a requirement and request a sort parameter.
32
Tell me about a time a BDD conversation clarified a requirement before development started.
Situation: a story said users get a refund if an order is cancelled early. Task: write scenarios with the product owner and developer. Action: while writing examples I asked what early meant and whether shipped orders counted. The three of us found the story had no time limit and no rule for partial shipments, and we wrote four concrete scenarios. Result: the rules were fixed before coding, avoiding a rework that had happened in a previous sprint.
33
Tell me about a time you moved from web automation to mobile automation.
Situation: my team needed Android regression tests and I only knew Selenium. Task: deliver a smoke suite in one month. Action: I learned Appium 2 setup, used Appium Inspector to find locators, asked developers to add accessibility ids, and reused our TestNG, POM and reporting structure with a new driver factory. Result: twenty smoke tests ran nightly on emulators within four weeks, and release smoke testing dropped from half a day to forty minutes.
34
How do you validate a JSON response in REST Assured?
A cloud farm gives hundreds of device and OS combinations, parallel capacity and no hardware maintenance, but costs per minute, adds network latency and may raise data privacy concerns. An in-house lab is cheaper over time for a small fixed set of devices and gives full control, but needs USB hubs, OS updates, battery care and someone to maintain it. Many teams keep a few local devices for debugging and use the cloud for wide coverage.
BasePage is a parent class for all page objects holding common things: the driver reference, a WebDriverWait, and helper methods such as click with wait, type, getText, waitForVisible and scrollIntoView. Child pages extend it and stay focused on page-specific locators and actions. Keep it small; if it grows into hundreds of methods, move helpers into separate utility classes using composition.
Which companies hire Automation Testing professionals in Delhi?
Companies with large offices in Delhi include Samsung, Boston Consulting Group. Use their company pages below to practise employer-specific sets.
Are Automation Testing interviews in Delhi different from other cities?
The questions depend more on the company than the city. Delhi's mix of employers decides the style: Delhi itself hosts many corporate, government-tech and consulting offices, and most candidates also apply across Noida and Gurgaon, so interviews here mix service-company and product-company styles
How do I find Automation Testing jobs in Delhi?
Shortlist companies with Delhi offices, keep your CV focused on Automation Testing projects, apply on company career pages and job portals with the Delhi filter, and practise the questions on this page before each interview.