Skip to content

Automation Testing Interview Questions in Bangalore

36 practice questions with answers for Automation Testing interviews in Bangalore.

Automation Testing jobs in Bangalore

Bangalore (Bengaluru) is India's largest technology hub, with global product companies, engineering centres, unicorn start-ups and big IT-services campuses. Product-company interviews here are usually deeper, with more scenario, design and hands-on rounds.

Below are 36 questions that match the mix of service, product and domain employers hiring automation testers in Bangalore.

Solved for BangaloreStart 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

What is the use of the this and super keywords?

Save to ▾
Show answer
this refers to the current object; super refers to the parent class, used to call parent constructors and methods.
02

An element is visible in Appium Inspector but your test throws NoSuchElementException on the device. What do you check?

Save to ▾
Show answer
First check timing: the screen may still be loading, so add an explicit wait for presence. Then check context: in a hybrid app the element may be in a webview while you are in NATIVE_APP. Confirm the locator matches exactly, including package prefix in resource-id. The element may be off screen in a list, so scroll first. Also check that the Inspector session used the same app build, language and device size as the test.
03

How do you extract an auth token with JSON Extractor and use it in later JMeter requests?

Save to ▾
Show answer
Add a JSON Extractor as a child of the login sampler. Set the variable name to token, the JSON path expression to $.access_token, match number 1 and a default like TOKEN_NOT_FOUND so failures are visible. Then add an HTTP Header Manager at Thread Group level with Authorization set to Bearer ${token}. Each thread extracts and uses its own token, because JMeter variables are per thread.
04

How do you capture a screen recording of a mobile test and attach it on failure?

Save to ▾
Show answer
// 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); }
05

What is data-driven testing?

Save to ▾
Show answer
Running the same test logic with multiple data sets from Excel, CSV, JSON or a database, so coverage increases without duplicating code.
06

What is idempotency in REST APIs and why does it matter for testing?

Save to ▾
Show answer
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.
07

What are filters in REST Assured?

Save to ▾
Show answer
Filters intercept requests and responses, similar to middleware. They implement the Filter interface and can add headers, refresh tokens, log traffic, or attach request and response details to Allure reports with AllureRestAssured. You add them with given().filter(myFilter) or globally in a RequestSpecification. Filters keep cross-cutting concerns out of individual tests.
08

What is the LoadableComponent pattern in Selenium?

Save to ▾
Show answer
LoadableComponent is a Selenium support class that standardises how a page object ensures it is loaded. You extend it and implement load(), which navigates to the page, and isLoaded(), which throws an Error if the page is not ready. Calling get() checks isLoaded and calls load only if needed, then checks again. It gives a consistent, self-verifying way to open pages and fails fast with a clear message.
09

What is git stash and when would you use it?

Save to ▾
Show answer
git stash saves uncommitted changes and cleans the working directory so you can switch branches. Later, git stash pop reapplies them. Use it when you are halfway through a change and must quickly fix something on another branch. git stash list shows saved stashes, and git stash push -m "msg" names them. For longer work, a temporary commit on a branch is clearer.
10

Write Appium code to scroll to an element by its text using UiScrollable on Android.

Save to ▾
Show answer
// Scrolls the first scrollable container until the text is visible String selector = "new UiScrollable(new UiSelector().scrollable(true))" + ".scrollIntoView(new UiSelector().text(\"Order History\"))"; WebElement item = driver.findElement(AppiumBy.androidUIAutomator(selector)); item.click();
11

What is method chaining in Page Object Model?

Save to ▾
Show answer
Method chaining means page methods return a page object, either this or the next page, so calls can be linked: loginPage.enterUser("asha").enterPassword("x").submit().openOrders(). Returning the next page models navigation and makes tests read like a user journey. Be careful when an action can lead to different pages; return the correct type or provide separate methods for success and failure.
12

What is the difference between parallel="methods", "classes" and "tests" in testng.xml?

Save to ▾
Show answer
methods runs each @Test method in its own thread, giving the most parallelism but requiring fully independent tests and thread-safe drivers. classes runs all methods of one class in the same thread, with different classes in parallel. tests runs each <test> tag in parallel, often used to run different browsers. instances is also available for factory instances. thread-count sets the pool size.
13

POST vs PUT vs PATCH?

Save to ▾
Show answer
POST creates a resource, PUT replaces the whole resource (idempotent) and PATCH updates part of it.
14

How do you extract a value from one response and use it in the next request?

Save to ▾
Show answer
String token = given().body(creds).when().post("/login") .then().statusCode(200) .extract().path("token"); given() .header("Authorization", "Bearer " + token) .when() .get("/orders") .then() .statusCode(200);
15

What is the Screenplay pattern and how does it compare to POM?

Save to ▾
Show answer
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.
16

What new features came with Selenium 4?

Save to ▾
Show answer
Relative locators, improved Grid, W3C compliance, new window or tab creation, Chrome DevTools Protocol access and element-level screenshots.
17

What are Java collections and which ones do testers use most?

Save to ▾
Show answer
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.
18

Write the command to run a JMeter test in non-GUI mode and generate the HTML report.

Save to ▾
Show answer
# -n non-GUI, -t test plan, -l results file, -e -o HTML dashboard folder jmeter -n -t tests/checkout.jmx \ -l results/checkout.jtl \ -e -o results/html-report \ -Jusers=100 -Jrampup=60 -Jduration=600 # generate a report later from an existing JTL jmeter -g results/checkout.jtl -o results/html-report-2
19

Which tests should run at each stage of a CI/CD pipeline?

Save to ▾
Show answer
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.
20

How do you validate an XML response in REST Assured?

Save to ▾
Show answer
// REST Assured uses GPath for XML as well as JSON given() .accept(ContentType.XML) .when() .get("/orders/42") .then() .statusCode(200) .contentType(ContentType.XML) .body("order.@id", equalTo("42")) .body("order.items.item.size()", equalTo(3)) .body("order.status", equalTo("SHIPPED"));
21

What is the difference between average, median and 95th percentile response time?

Save to ▾
Show answer
Average is the sum divided by count, so a few very slow requests can distort it. Median is the middle value, meaning half the requests were faster. The 95th percentile means 95 percent of requests were faster than that value, which reflects what most users experience including slow cases. SLAs are usually written on 90th, 95th or 99th percentiles because averages hide long tails that frustrate real users.
22

What is a DataProvider in TestNG?

Save to ▾
Show answer
@DataProvider returns Object[][]; a @Test(dataProvider = "name") method runs once per row — the basis of data-driven tests, often reading Excel or JSON.
23

What locators does Selenium support?

Save to ▾
Show answer
id, name, className, tagName, linkText, partialLinkText, CSS selector and XPath. Prefer stable ids or CSS, using XPath when needed.
24

How do you handle waits inside page objects?

Save to ▾
Show answer
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.
25

How do you share state between step definition classes in Cucumber Java?

Save to ▾
Show answer
Use dependency injection. With cucumber-picocontainer (or Spring/Guice), create a context class such as TestContext holding the driver, page objects and scenario data, and add it as a constructor parameter in every step class. Cucumber creates one instance per scenario and injects the same object everywhere, so state is shared within a scenario but never leaks between scenarios. Avoid static fields because they break parallel runs.
26

Your Selenium tests in CI produce blank screenshots in headless mode. What could be wrong?

Save to ▾
Show answer
The screenshot may be taken before the page renders, the window size in headless mode may be tiny, or the browser is crashing due to low shared memory in Docker. Set --window-size=1920,1080, use the new headless mode, wait for page content before capturing, and add --disable-dev-shm-usage or a larger shm size for containers.
27

How do you handle a browser basic authentication pop-up in Selenium?

Save to ▾
Show answer
The basic auth dialog is not part of the page, so findElement cannot reach it. The simplest way is putting credentials in the URL, like https://user:pass@site.test, which works in many browsers. In Selenium 4 with Chromium you can register credentials through the HasAuthentication interface: ((HasAuthentication) driver).register(UsernameAndPassword.of("user", "pass")). Keep the credentials in environment variables or a secret store, never in code.
28

How do you undo a commit that has already been pushed?

Save to ▾
Show answer
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.
29

What is the scope of a step definition class instance in Cucumber?

Save to ▾
Show answer
Cucumber creates a new instance of every glue class for each scenario. Instance fields therefore reset between scenarios, which keeps scenarios isolated. This is why you should not rely on static variables for state: they survive across scenarios and threads, causing order-dependent failures and clashes in parallel runs. Share state through injected context objects instead.
30

How do you handle multiple windows?

Save to ▾
Show answer
String parent = driver.getWindowHandle(); for (String h : driver.getWindowHandles()) if (!h.equals(parent)) driver.switchTo().window(h); // ...then switch back to parent
31

How do you mock an external API in automation tests?

Save to ▾
Show answer
Use a tool such as WireMock or MockServer to run a stub server that returns predefined responses for given requests. Point the application or tests to the stub with configuration. This lets you test error codes, timeouts and edge cases that are hard to trigger on the real service, and keeps tests stable when the third party is down. Still keep a few tests against the real integration.
32

What are listeners in TestNG?

Save to ▾
Show answer
Classes like ITestListener that react to events such as test start, success or failure, commonly used for screenshots and reporting.
33

How do you handle a component that appears inside many different pages, like a modal dialog?

Save to ▾
Show answer
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.
34

Your helper catches Exception and prints the stack trace, and tests pass even when steps fail. What is the issue?

Save to ▾
Show answer
Swallowing exceptions hides failures, so TestNG never sees an error and marks the test passed. Catch only specific exceptions you can handle, add context and rethrow, or let them propagate. If you need logging, log and then throw. Code reviews should flag empty catch blocks and broad catch (Exception e) in test code.
35

What is the difference between an array and an ArrayList?

Save to ▾
Show answer
Arrays have a fixed size and can hold primitives; ArrayList grows dynamically, holds objects and offers helper methods.
36

What is a BasePage and what should it contain?

Save to ▾
Show answer
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.

Companies with offices in Bangalore (134)

IT services

TCS

Automation Testing interview questions

  • 40 questions
  • 4 rounds

Mumbai, Chennai, Pune +2

View questions
IT services

Infosys

Automation Testing interview questions

  • 40 questions
  • 4 rounds

Bengaluru, Mysuru, Pune +2

View questions
IT services

Wipro

Automation Testing interview questions

  • 40 questions
  • 4 rounds

Bengaluru, Hyderabad, Pune +2

View questions
Consulting

Accenture

Automation Testing interview questions

  • 40 questions
  • 4 rounds

Bengaluru, Hyderabad, Pune +2

View questions
IT services

Cognizant

Automation Testing interview questions

  • 40 questions
  • 4 rounds

Chennai, Bengaluru, Pune +2

View questions
IT services

Capgemini

Automation Testing interview questions

  • 40 questions
  • 4 rounds

Mumbai, Bengaluru, Pune +2

View questions
Consulting

Deloitte

Automation Testing interview questions

  • 40 questions
  • 4 rounds

Hyderabad, Bengaluru, Mumbai +2

View questions
Product

Amazon

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Bengaluru, Hyderabad, Chennai +2

View questions
Product

Google

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Bengaluru, Hyderabad, Gurugram +2

View questions
Product

Meta

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Gurugram, Bengaluru, Hyderabad +1

View questions
Product

Microsoft

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Hyderabad, Bengaluru, Noida +2

View questions
Hardware & semiconductors

Apple

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Hyderabad, Bengaluru, Mumbai +1

View questions
Product

Adobe

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Noida, Bengaluru, Gurugram

View questions
Product

Oracle

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Bengaluru, Hyderabad, Noida +2

View questions
Product

Salesforce

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Hyderabad, Bengaluru, Mumbai +1

View questions
Product

ServiceNow

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Hyderabad, Bengaluru

View questions
Product

Atlassian

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Bengaluru

View questions
Fintech

Intuit

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Bengaluru

View questions
Hardware & semiconductors

Cisco

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Bengaluru, Pune, Chennai

View questions
Product

LinkedIn

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Bengaluru, Gurugram, Mumbai

View questions
Product

Uber

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Bengaluru, Hyderabad, Gurugram

View questions
E-commerce & consumer tech

Walmart

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Bengaluru, Chennai, Gurugram

View questions
E-commerce & consumer tech

Flipkart

Automation Testing interview questions

  • 40 questions
  • 5 rounds

Bengaluru, Hyderabad

View questions
E-commerce & consumer tech

Swiggy

Automation Testing interview questions

  • 40 questions
  • 4 rounds

Bengaluru, Hyderabad

View questions

Frequently asked questions

Which companies hire Automation Testing professionals in Bangalore?

Companies with large offices in Bangalore include TCS, Infosys, Wipro, Accenture, Cognizant, Capgemini, Deloitte, Amazon, Google, Meta. Use their company pages below to practise employer-specific sets.

Are Automation Testing interviews in Bangalore different from other cities?

The questions depend more on the company than the city. Bangalore's mix of employers decides the style: Product-company interviews here are usually deeper, with more scenario, design and hands-on rounds

How do I find Automation Testing jobs in Bangalore?

Shortlist companies with Bangalore offices, keep your CV focused on Automation Testing projects, apply on company career pages and job portals with the Bangalore filter, and practise the questions on this page before each interview.