Skip to content

Kotak Mahindra Bank Automation Testing Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

About Kotak Mahindra Bank hiring for Automation Testing roles

Kotak Mahindra Bank is a major Indian private sector bank offering retail banking, corporate banking, wealth management, credit cards and digital banking through products like Kotak 811. The wider Kotak group also includes securities, asset management and insurance businesses. It hires for relationship management, operations, risk, analytics and technology roles across its offices and branches.

For Automation Testing roles, this Kotak Mahindra Bank practice set focuses most on Core Java for Testers (7), TestNG Framework (7), Selenium WebDriver (6), REST Assured (4). It has 2 easy, 34 medium, 4 hard questions, so you can start easy and work up to the harder ones.

Company type
Banking & finance
Headquarters
Mumbai, India
Main India offices
Mumbai, Bengaluru

Kotak Mahindra Bank Automation Testing interview process

  1. Online assessment or resume screening
  2. Functional or technical interview
  3. Managerial round
  4. HR round

Typical pattern based on public candidate experiences. Rounds vary by role, team and year.

Solved for Kotak Mahindra BankStart 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 a test that is flaky only in headless mode?

Save to ▾
Show answer
Set window size explicitly, use proper waits, check animations and viewport differences, and capture screenshots and logs to find timing issues.
02

Tests on the Grid fail with SessionNotCreatedException saying the new session request timed out. What do you check?

Save to ▾
Show answer
It means no matching free slot appeared in time. Check the Grid UI to see whether nodes are registered and whether their capabilities match the request, such as browser name, version or platform. Compare the test thread count with total slots, since extra threads just wait in the queue. Look for stuck sessions holding slots after aborted builds. Then increase capacity, reduce threads, or raise the session request timeout.
03

What is method overriding and where is it useful in frameworks?

Save to ▾
Show answer
A subclass redefines a parent method. Frameworks use it to customise base behaviour, such as overriding a wait or click method in a base page class.
04

How do you make page objects work with dynamic locators, such as a row containing a given name?

Save to ▾
Show answer
Write a method that builds the locator from a parameter, for example private By rowFor(String name) { return By.xpath("//tr[td[normalize-space()='" + name + "']]"); }, and expose actions like deleteUser(name). Keep the template in the page class, not in tests. Escape quotes if names may contain them, and prefer CSS with data attributes when the application provides them.
05

What is RequestSpecification in REST Assured and why use it?

Save to ▾
Show answer
RequestSpecification holds common request settings such as base URI, base path, headers, content type, authentication and filters. You build it once with RequestSpecBuilder and reuse it with given().spec(reqSpec). This removes repetition, keeps environment settings in one place and makes switching between QA and staging easy. ResponseSpecification does the same for common assertions like status code and content type.
06

Should every test in a project be written in Cucumber?

Save to ▾
Show answer
No. Cucumber adds a translation layer, so it is worth it for business-facing acceptance tests that stakeholders discuss. Unit tests, low-level API checks, data validations and technical edge cases are faster to write and maintain directly in TestNG or JUnit. A healthy project uses Cucumber for a focused set of key behaviours and plain code tests for everything else.
07

How do you build dynamic JSON request bodies without hard-coded strings?

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

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.
09

What is the Background keyword and when should you avoid it?

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

What is the difference between Comparable and Comparator in Java?

Save to ▾
Show answer
Comparable defines the natural order inside the class (compareTo); Comparator defines custom orders externally (compare), useful for sorting test data in several ways.
11

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.
12

What does alwaysRun = true do in TestNG?

Save to ▾
Show answer
On a configuration method like @AfterMethod(alwaysRun = true), it makes the method run even when tests fail or are skipped, or when groups filter would exclude it. It is essential for cleanup such as driver.quit(). On a test with dependsOnMethods, alwaysRun = true runs it even if the dependency failed. Missing alwaysRun on teardown is a common cause of leftover browsers in CI.
13

How does the DataProvider annotation work?

Save to ▾
Show answer
A method annotated with @DataProvider returns a 2D object array and the test with dataProvider = "name" runs once per row.
14

How do you pass parameters from testng.xml?

Save to ▾
Show answer
Define parameter name and value in the XML and read them with @Parameters in the test or configuration method.
15

A TestNG test passes when run alone but fails when the full class runs. What do you check?

Save to ▾
Show answer
Look for shared state between methods: instance or static fields changed by earlier tests, data created or deleted by another test, cookies or logged-in session kept in the same browser, and priority or order assumptions. Run the class in a different order to confirm. Fix by resetting state in @BeforeMethod, creating unique data per test and avoiding static fields.
16

What is the use of Maven in automation projects?

Save to ▾
Show answer
It manages dependencies through pom.xml, builds the project, runs tests with Surefire and standardises structure across teams.
17

How would you design one mobile framework that serves both Android and iOS?

Save to ▾
Show answer
Keep tests platform-neutral and push differences into page objects. Use Appium's @AndroidFindBy and @iOSXCUITFindBy annotations, or separate locator files per platform, behind one screen class. Create the driver through a factory that reads platform from configuration. Ask developers to add the same accessibility ids on both platforms so most locators are shared. Put gestures and waits in a common base screen, and tag tests that apply to only one platform.
18

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.
19

What are pre-processors and post-processors in JMeter?

Save to ▾
Show answer
Pre-processors run before a sampler, for example a JSR223 PreProcessor that builds a signature or timestamp, or User Parameters that set values per thread. Post-processors run after a sampler and usually extract data from the response, such as JSON Extractor, Regular Expression Extractor or Boundary Extractor, storing it as a variable for later requests. Their scope depends on where they sit in the tree, so place them as children of the right sampler.
20

Write a REST Assured test that deserializes a response into a POJO.

Save to ▾
Show answer
@Test public void getUserAsPojo() { User user = given() .pathParam("id", 2) .when() .get("/users/{id}") .then() .statusCode(200) .extract().as(User.class); Assert.assertEquals(user.getId(), 2); Assert.assertNotNull(user.getEmail()); }
21

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.
22

What is IAnnotationTransformer in TestNG?

Save to ▾
Show answer
IAnnotationTransformer is a listener that changes @Test annotations at runtime before tests run. A common use is attaching a retry analyzer to every test automatically instead of adding retryAnalyzer to each method, or enabling and disabling tests from configuration. It must be registered in testng.xml or via service loader, not with the @Listeners annotation.
23

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.
24

How do you handle dynamic elements whose ids change?

Save to ▾
Show answer
Use CSS or XPath with contains(), starts-with() or stable attributes, relative axes, or data-test attributes agreed with developers.
25

How do you test API security basics as an automation tester?

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

Describe a time you automated a manual build or release step for the QA team.

Save to ▾
Show answer
Situation: before each regression a tester spent an hour deploying the build to QA and seeding data by hand. Task: remove that manual step. Action: I wrote a Jenkins pipeline stage that deployed the build, ran database seed scripts and a smoke check, then triggered the regression job, and documented it for the team. Result: setup dropped to ten minutes without human effort, and regressions could run overnight automatically.
27

Half of your TestNG tests are skipped in CI with no failure shown. What could cause it?

Save to ▾
Show answer
Usually a configuration method failed, such as @BeforeClass or @BeforeSuite throwing an exception, which makes TestNG skip dependent tests. Other causes are dependsOnMethods on a failed test, a group filter excluding setup methods without alwaysRun, or a DataProvider that threw an exception. Check the configuration failures section of the report and the log for the first exception.
28

A dropdown option list loads only after typing three letters. How do you automate selecting a value?

Save to ▾
Show answer
Type the text with sendKeys, wait for the suggestion list with visibilityOfAllElementsLocatedBy, then find the option whose text matches the required value and click it. Avoid selecting by index because suggestion order may change. If the list is virtualised, type more characters to narrow results. Verify the selected value in the input afterwards.
29

How do you handle test data cleanup in Cucumber scenarios?

Save to ▾
Show answer
Create data in Given steps through APIs, record the created IDs in the scenario context, and delete them in an @After hook, which runs even when the scenario fails. Use unique names with a timestamp or UUID to avoid clashes in parallel runs. For shared environments, add a nightly cleanup job for leftover data tagged with a test prefix.
30

How do you handle StaleElementReferenceException?

Save to ▾
Show answer
Re-locate the element after the DOM refreshes, use explicit waits for the refreshed element, don't keep element references for long, or wrap the action in retry logic.
31

Your code review shows a test class with 30 copy-pasted lines in every method. How do you refactor it with Java features?

Save to ▾
Show answer
Extract repeated steps into private helper methods or a page object, move common setup into @BeforeMethod, and use a DataProvider when only data differs. If the repeated code differs only in a small action, pass that action as a lambda, such as a Consumer<WebDriver>. Rerun the tests after each small refactor to confirm behaviour is unchanged.
32

Why do Selenium browser containers need a larger shm_size?

Save to ▾
Show answer
Chrome and Firefox use shared memory at /dev/shm for rendering and inter-process communication. Docker gives containers only 64 MB of shared memory by default, which is not enough for modern pages, so the browser tab crashes with errors like session deleted because of page crash. Setting shm_size to 2g in Compose, or --shm-size=2g with docker run, fixes it. Mounting /dev/shm from the host is an alternative.
33

Write a Java stream that extracts and sorts product prices from a list of WebElements.

Save to ▾
Show answer
List<Double> prices = driver.findElements(By.cssSelector(".price")) .stream() .map(WebElement::getText) .map(t -> t.replaceAll("[^0-9.]", "")) .map(Double::parseDouble) .sorted() .collect(Collectors.toList()); System.out.println(prices);
34

How do you test an application that requires login on every test without slowing the suite?

Save to ▾
Show answer
Log in once through the API, capture the session cookie or token, and inject it into the browser with driver.manage().addCookie() after opening the domain, or set local storage with JavaScript. Then navigate directly to the page under test. Keep one real UI login test to cover the login page itself. This often saves several seconds per test.
35

Tell me about a time you mentored a junior tester in Java and automation.

Save to ▾
Show answer
Situation: two new joiners from manual testing struggled with framework code. Task: help them contribute within a sprint. Action: I paired with them daily for an hour, gave small tasks like adding a locator then a full test, and reviewed their code with explanations rather than rewriting it. Result: within three weeks both were writing tests independently, and our automation backlog shrank.
36

How do you retry failed tests in TestNG?

Save to ▾
Show answer
Implement IRetryAnalyzer with a retry count and attach it through the test annotation or a listener to rerun flaky tests.
37

How do you verify that the correct page has loaded in POM?

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

A test configuration value has to be the same for the whole run and accessed from many classes. How do you implement it?

Save to ▾
Show answer
Create a ConfigReader that loads properties once, using a singleton or a static holder initialised lazily in a thread-safe way, and exposes typed getters like getInt("timeout"). Let system properties and environment variables override file values so CI can change them. Keep it read-only after loading so parallel threads cannot change settings mid-run.
39

What are the three amigos in BDD?

Save to ▾
Show answer
The three amigos are the business representative (product owner or BA), the developer and the tester, who meet before development to discuss a story. They agree on rules and concrete examples, which become Gherkin scenarios. The meeting catches misunderstandings early, before code is written. Cucumber automation is the output, but the conversation is the real value of BDD.
40

Write a BasePage helper that clicks an element after waiting for it to be clickable.

Save to ▾
Show answer
public abstract class BasePage { protected final WebDriver driver; protected final WebDriverWait wait; protected BasePage(WebDriver driver) { this.driver = driver; this.wait = new WebDriverWait(driver, Duration.ofSeconds(10)); } protected void click(By locator) { wait.until(ExpectedConditions.elementToBeClickable(locator)).click(); } }

Tips to crack the Kotak Mahindra Bank Automation Testing interview

  • Revise banking basics such as types of accounts, loans, interest rates, KYC and the role of the RBI.
  • For technology and analytics roles, prepare SQL, Excel and one programming language, with examples from your projects.
  • Read about Kotak's digital banking efforts like Kotak 811 and recent banking news to discuss them in interviews.
  • Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
  • Practise the hard questions on this page aloud; Kotak Mahindra Bank interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Kotak Mahindra Bank Automation Testing interview?

Candidates usually go through 4 stages: Online assessment or resume screening; Functional or technical interview; Managerial round; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.

Which topics should I prepare for the Kotak Mahindra Bank Automation Testing interview?

This practice set leans on Core Java for Testers (7), TestNG Framework (7), Selenium WebDriver (6), REST Assured (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Kotak Mahindra Bank interviewers ask you to walk through real work.

Are these the exact questions asked at Kotak Mahindra Bank?

No. These are curated practice questions that match the skills and difficulty usually tested in banking & finance interviews like Kotak Mahindra Bank's. They are not a leaked or verified list of past questions.

Where does Kotak Mahindra Bank hire Automation Testing professionals in India?

Kotak Mahindra Bank has large teams in Mumbai, Bengaluru. Openings and locations change often, so check the Kotak Mahindra Bank careers page and filter by city and experience.

Automation Testing questions for similar companies