Skip to content

ICICI 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 ICICI Bank hiring for Automation Testing roles

ICICI Bank is a large Indian private sector bank offering retail, corporate, digital and international banking. Its technology, analytics and operations teams work on products like iMobile Pay, credit decisioning, fraud detection and customer analytics. It hires for data analysts, risk analysts, testers, software engineers and management trainees.

For Automation Testing roles, this ICICI Bank practice set focuses most on Page Object Model (8), REST Assured (5), Cucumber and BDD (5), Core Java for Testers (4). It has 4 easy, 31 medium, 5 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, Hyderabad, Chennai, Bengaluru

ICICI Bank Automation Testing interview process

  1. Online assessment (aptitude + domain)
  2. Technical or functional interview
  3. Managerial round
  4. HR round

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

Solved for ICICI 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 pass the WebDriver to page objects in a parallel framework?

Save to ▾
Show answer
Use a DriverManager with a ThreadLocal<WebDriver>, created in @BeforeMethod and removed in @AfterMethod. Page objects receive the driver through the constructor or get it from DriverManager.getDriver(). Constructor injection is cleaner and easier to test. Never store the driver in a static field shared by all threads, or parallel tests will control each other's browsers.
02

Should assertions be written inside page objects?

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

What is polymorphism and how does it show up in Selenium?

Save to ▾
Show answer
One interface, many forms. WebDriver driver = new ChromeDriver() lets the same test code run on any browser class that implements WebDriver.
04

What is Docker Compose and why is it useful for Selenium Grid?

Save to ▾
Show answer
Docker Compose lets you define several containers, their images, ports, environment variables and networks in one docker-compose.yml file and start them together with docker compose up. For Selenium it means a hub plus Chrome, Firefox and Edge nodes, and even the application under test, start with one command on any laptop or CI agent. The file is version-controlled, so every tester and pipeline uses the same Grid setup.
05

You configured 50 parallel threads but only 8 tests run at a time on the Grid. Why?

Save to ▾
Show answer
The Grid only has 8 free slots, so the other requests wait in the New Session Queue. Total parallelism equals nodes multiplied by max sessions per node, not the TestNG thread count. Check the Grid UI for slot count. To run more, scale the node containers, raise max sessions if hardware allows, or use a larger grid. Otherwise reduce threads to match slots so waiting requests do not time out.
06

How do you assert on an array in a JSON response using Hamcrest?

Save to ▾
Show answer
Use collection matchers inside body(). For example body("data.id", hasItems(1, 2)), body("data", hasSize(6)), body("data.email", everyItem(containsString("@"))) and body("data.find { it.id == 3 }.name", equalTo("Neha")). These check the whole collection in one line. For complex rules, extract a List with jsonPath().getList() and assert with Java or AssertJ.
07

How does HashMap work internally?

Save to ▾
Show answer
It uses the key's hashCode to find a bucket and equals to resolve collisions, giving O(1) average lookups; Java 8 converts long buckets into trees.
08

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
09

What is a Jenkins pipeline?

Save to ▾
Show answer
A scripted or declarative Jenkinsfile that defines stages such as build, test and deploy as code stored with the project.
10

How do you pass authentication in an API test?

Save to ▾
Show answer
Use headers such as Bearer tokens, basic auth, API keys or OAuth flows; fetch a token in a setup step and reuse it.
11

What is PageFactory?

Save to ▾
Show answer
A helper that initialises @FindBy elements lazily using initElements; some teams skip it in favour of plain By locators.
12

How do you handle stakeholders who ask for performance testing only a few days before go-live?

Save to ▾
Show answer
Situation: a product team requested load testing three days before launch. Task: give useful results fast and set expectations. Action: I explained the risk, agreed on the two most critical journeys, reused API scripts and ran a short load and spike test, sharing results daily. I also proposed adding a performance stage to future sprints. Result: we found a missing database index before launch, and the next release included performance tests from the start.
13

Describe a time you convinced your team to run tests in Docker.

Save to ▾
Show answer
Situation: our tests behaved differently on each tester's laptop and on Jenkins because of browser and driver versions. Task: make results consistent. Action: I built a small demo with Docker Compose running the Grid and the app, showed identical results on three machines and on CI, and wrote a one-page setup guide. Result: the team adopted it within two sprints, works-on-my-machine failures almost disappeared and new joiners were productive on day one.
14

Should page objects use inheritance or composition?

Save to ▾
Show answer
Use a shallow inheritance only for a BasePage with common helpers. For shared UI parts, use composition: a page has a Header, a SideMenu and a Table component. Deep inheritance like BasePage to ListPage to ProductListPage to SaleProductListPage becomes fragile and hard to debug. Composition mirrors how modern UIs are built from components and keeps classes small.
15

Response time grows slowly over a six-hour soak test while load stays constant. What does it suggest?

Save to ▾
Show answer
A steady rise under constant load usually indicates a resource leak, such as memory not being freed, growing caches, unclosed database connections or threads, or log and temp files filling disk. Check heap usage and garbage collection trends, connection pool counts and open file handles over time. A heap dump comparison can show which objects grow. Share the evidence with developers, since such issues rarely appear in short tests.
16

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()); }
17

How do you group tests?

Save to ▾
Show answer
Tag tests with groups = {"smoke","regression"} and include or exclude them in testng.xml to run chosen sets.
18

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

How do you verify response time and headers in REST Assured?

Save to ▾
Show answer
Use then().time(lessThan(2000L)) and then().header("Content-Type", containsString("json")) along with body assertions.
20

How do you run the same test with data from Excel using a DataProvider?

Save to ▾
Show answer
Write a utility that reads the sheet with Apache POI and returns Object[][] with one row per test case. Create a @DataProvider method that calls the utility, and set dataProvider = "loginData" on the test. Each row runs as a separate test with its own result. Keep the file in src/test/resources and consider CSV or JSON, which are easier to review in Git.
21

Your company is debating a cloud device farm versus an in-house device lab. How do you advise?

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

A developer changed the UI and 40 tests failed with NoSuchElementException. How does POM help here?

Save to ▾
Show answer
Because locators live only in page classes, I check which page object methods fail, update the changed locators in those few classes, and rerun. Usually 40 failures map to two or three locators. I would also ask developers to add stable data-testid attributes and review UI changes with QA early, so future changes do not break tests unexpectedly.
23

How do you handle a dropdown that is not a <select> tag?

Save to ▾
Show answer
Click to open the dropdown, then locate the option by its text, e.g. //li[text()='India'], and click it. Add an explicit wait for the animation.
24

How do you test GraphQL APIs compared with REST?

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

What is the difference between hard and soft assertions?

Save to ▾
Show answer
Hard assert stops the test at the first failure; SoftAssert collects failures and reports them together when assertAll() is called.
26

What is the Page Object Model?

Save to ▾
Show answer
A design pattern where each page is a class holding its locators and actions, so tests stay readable and a locator change is fixed in one place.
27

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

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(); } }
29

Write Appium Java code to perform a vertical swipe using W3C Actions.

Save to ▾
Show answer
// Swipe up from 80% to 20% of the screen height Dimension size = driver.manage().window().getSize(); int x = size.width / 2; int startY = (int) (size.height * 0.8); int endY = (int) (size.height * 0.2); PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger"); Sequence swipe = new Sequence(finger, 1); swipe.addAction(finger.createPointerMove(Duration.ZERO, PointerInput.Origin.viewport(), x, startY)); swipe.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg())); swipe.addAction(finger.createPointerMove(Duration.ofMillis(600), PointerInput.Origin.viewport(), x, endY)); swipe.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg())); driver.perform(List.of(swipe));
30

What makes a good Gherkin scenario?

Save to ▾
Show answer
A good scenario describes one behaviour in business language, uses declarative steps ("When the user logs in as a manager") rather than UI clicks ("When I click the login button"), has one When and a clear Then, stays under about 5 to 7 steps and is independent of other scenarios. The title should state the rule being checked so failures are understood without opening the code.
31

Tell me about a time you reduced the run time of a test suite significantly.

Save to ▾
Show answer
Situation: our TestNG regression took three hours, so it only ran nightly. Task: get it under forty minutes to run on every merge. Action: I profiled slow tests, replaced UI login with an API token, made the driver ThreadLocal and enabled parallel classes, moved data setup to APIs and removed duplicate tests. Result: the suite ran in thirty-five minutes on four threads, and defects were caught on the same day they were introduced.
32

A test fails with TimeoutException waiting for an element that is clearly visible on screen. What do you check?

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

What are Cucumber Expressions and how do they differ from regular expressions?

Save to ▾
Show answer
Cucumber Expressions are the default, simpler way to match steps, using parameter types like {int}, {string}, {word} and {float}. For example "I add {int} items" captures a number and converts it to an Integer automatically. Regular expressions are still supported and offer more control, but are harder to read. Teams usually prefer Cucumber Expressions and define custom parameter types for domain values.
34

What are Cucumber hooks and how are they different from Background?

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

How do you test an API that returns paginated results?

Save to ▾
Show answer
Call the first page, check page size, total count and the next link or cursor. Loop through pages until there is no next page, collecting IDs, then assert no duplicates and the total matches the reported count. Also test edge cases: page 0, a page beyond the last, invalid page size and sorting stability. Cap the loop to avoid endless runs if the API misbehaves.
36

How do you trigger a Jenkins job automatically?

Save to ▾
Show answer
Common triggers are webhooks from GitHub, GitLab or Bitbucket on push or pull request, cron schedules with triggers { cron('H 2 * * *') } for nightly regression, polling SCM (less efficient), and upstream jobs completing, such as running tests after a deploy job. Multibranch pipelines automatically create jobs for each branch and pull request containing a Jenkinsfile.
37

What is the difference between imperative and declarative Gherkin?

Save to ▾
Show answer
Imperative Gherkin lists UI actions: enter username, enter password, click submit. Declarative Gherkin states intent: Given a registered customer is logged in. Declarative steps are shorter, survive UI changes and are understood by business people; the UI detail lives in step definitions and page objects. Imperative style is acceptable only when the exact interaction is the behaviour being tested.
38

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

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

How do you rerun only failed Cucumber scenarios?

Save to ▾
Show answer
Add the rerun plugin, for example rerun:target/failed.txt, to the main runner. It writes the location of each failed scenario. Create a second runner whose features point to @target/failed.txt and run it after the main run in Maven or Jenkins. Use reruns to separate real failures from flaky ones, but track flaky scenarios and fix them instead of hiding them.

Tips to crack the ICICI Bank Automation Testing interview

  • Learn Indian banking basics such as loan types, NPAs, CASA ratio and RBI regulations for interviews.
  • Use iMobile Pay and think about features you would test or improve as a QA or analyst candidate.
  • Revise SQL and Excel with examples on customer segmentation, credit risk or campaign analysis.
  • 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; ICICI Bank interviewers usually ask follow-ups on your first answer.

Frequently asked questions

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

Candidates usually go through 4 stages: Online assessment (aptitude + domain); Technical or functional 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 ICICI Bank Automation Testing interview?

This practice set leans on Page Object Model (8), REST Assured (5), Cucumber and BDD (5), Core Java for Testers (4). Revise those first, then practise explaining one or two of your own projects end to end, because most ICICI Bank interviewers ask you to walk through real work.

Are these the exact questions asked at ICICI Bank?

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

Where does ICICI Bank hire Automation Testing professionals in India?

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

Automation Testing questions for similar companies