State Bank of India Automation Testing Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About State Bank of India hiring for Automation Testing roles
State Bank of India is India's largest public sector bank, with a huge network of branches and digital services such as the YONO app. It offers retail and corporate banking, loans, deposits and government banking services. It typically recruits through public examinations for roles like probationary officer and clerk, and through specialist officer notifications for IT, risk and data roles.
For Automation Testing roles, this State Bank of India practice set focuses most on Core Java for Testers (9), Page Object Model (6), REST Assured (5), Git, Maven and Jenkins (5). It has 6 easy, 33 medium, 1 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, Navi Mumbai
State Bank of India Automation Testing interview process
Preliminary online exam (for PO or clerk roles)
Main online exam
Psychometric test, group exercise or interview
Document verification and final selection
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for State Bank of IndiaStart 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
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.
POM adds upfront design effort and extra classes, which can feel heavy for tiny projects. Poorly designed page objects become large god classes, mix assertions with actions, or use deep inheritance chains that are hard to follow. It also does not solve flaky waits or bad test data by itself. Good conventions, components and code reviews are needed to get its benefits.
04
How do you pass the WebDriver to page objects in a parallel framework?
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.
05
How would you explain to a manager why mobile automation estimates are higher than web estimates?
Situation: a manager questioned why my mobile estimate was nearly double the web one. Task: justify it with facts. Action: I listed the extra work: two platforms with separate locators, device and OS version matrix, slower sessions, app builds and signing, gestures and permissions, and device lab maintenance. I showed timings from a pilot of five tests. Result: the manager accepted a phased plan starting with Android smoke tests, and later estimates were trusted because they were data-backed.
06
Tell me about a time you mentored a junior tester in Java and automation.
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.
07
Write Appium code to scroll to an element by its text using UiScrollable on Android.
// 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();
08
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.
09
Tell me about a time you introduced BDD to a team. How did it go?
Situation: requirements were often misread, causing rework late in sprints. Task: I proposed BDD for one module. Action: I ran short three-amigos sessions, wrote example scenarios with the BA, automated them with Cucumber and showed them in sprint review. Result: rework on that module dropped noticeably over two sprints, and the team adopted the practice for other complex stories.
A special method that initialises an object. It can be overloaded with different parameters, and testers use it to pass the WebDriver into page classes.
11
What is the Maven Failsafe plugin and how is it different from Surefire?
Surefire runs unit tests in the test phase and stops the build as soon as tests fail. Failsafe runs integration tests in the integration-test phase and checks results later in the verify phase, so post-integration-test steps, like stopping a server or Docker containers, still run after failures. By default Failsafe picks classes named *IT. Many teams run UI and API suites through Failsafe with mvn verify for that reason.
12
PageFactory with @FindBy or By locators: which do you prefer and why?
Many teams now prefer plain By locators with explicit waits. PageFactory proxies look up elements lazily, which can hide timing problems and makes StaleElementReference harder to reason about, and its AjaxElementLocatorFactory waits are less flexible. PageFactory is fine and readable for stable pages. The key is consistency across the framework and always waiting for the right condition before acting.
13
Mobile tests pass on the emulator but fail on a low-end real device. How do you investigate?
Low-end devices are slower, so fixed waits and short timeouts expire before screens render. Replace sleeps with explicit waits and increase timeouts sensibly. Check for vendor-specific pop-ups, battery optimisation dialogs or different keyboards on that brand. Compare screen size and resolution, since coordinate-based taps break. Collect device logs with adb logcat and screen recordings to see what the app was doing. Also check whether the app crashed due to low memory.
14
What is polymorphism and how does it show up in Selenium?
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.
16
How do you read data from Excel or properties files in Java?
Send invalid or missing fields, wrong data types, values beyond limits, invalid IDs, expired or missing tokens, wrong HTTP methods and malformed JSON. Assert the correct status (400, 401, 403, 404, 405, 422) and a clear error body without stack traces. Negative tests often find more defects than happy paths because validation and security checks are frequently incomplete.
18
How do you run only selected scenarios using tags in Cucumber?
Add tags like @smoke or @regression above a Feature or Scenario, then filter with a tag expression. In the runner use @ConfigurationParameter(key = FILTER_TAGS_PROPERTY_NAME, value = "@smoke and not @wip") with the JUnit Platform engine, or pass -Dcucumber.filter.tags="@smoke" from Maven. Tag expressions support and, or, not and brackets, so CI can run smoke on every commit and regression nightly.
19
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.
20
How do you undo a commit that has already been pushed?
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.
21
An API returns a list in random order and your assertion on the first element fails intermittently. How do you fix it?
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.
@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 is the difference between static and non-static members?
Write scenarios in business terms, such as "When a customer places an order for 2 items". In step definitions, build the request with REST Assured, store the Response in a shared scenario context, and assert in Then steps using then().statusCode() and JSON path checks. Keep base URI, auth and specs in a helper class so steps stay short and the same steps serve many features.
25
A click works locally but throws ElementClickInterceptedException in CI. How do you fix it?
Another element, such as a cookie banner, loader overlay or sticky header, covers the target. In CI the window is often smaller, so the layout differs. Set a fixed window size, wait for the overlay to disappear with invisibilityOfElementLocated, close banners in setup and scroll the element into view. Use a JavaScript click only as a last resort, since it bypasses real user behaviour.
26
How do you test an API that depends on another service that is down?
Use multipart: given().multiPart("file", new File("src/test/resources/report.pdf"), "application/pdf").formParam("type", "invoice").when().post("/upload").then().statusCode(200). REST Assured sets the multipart/form-data content type automatically. Verify both the status and the response, such as the returned file id or size, and test edge cases like empty, oversized and wrong-type files.
29
What is JsonPath and how do you use it for nested JSON?
JsonPath (Groovy GPath syntax in REST Assured) navigates JSON with dot notation. For {"data":{"items":[{"price":10}]}} you use data.items[0].price. You can also filter: data.items.findAll { it.price > 5 }.name returns names of items costing more than 5. Use it inside body() assertions or via response.jsonPath().getList("data.items.name") to extract values for further checks.
30
How do you handle dynamic elements whose ids change?
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.
35
What is parameterization in JMeter and how does CSV Data Set Config work?
Parameterization replaces hard-coded inputs with varied test data so users do not all log in as the same account or search the same item, which would give unrealistic cache hits. CSV Data Set Config reads a CSV file line by line and stores columns into variables like ${username} and ${password}. You set the file path, variable names, delimiter, whether to recycle at end of file and the sharing mode across threads.
36
How do you make page objects work with dynamic locators, such as a row containing a given name?
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.
37
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.
Git marks conflicting sections with <<<<<<<, ======= and >>>>>>>. Open each file, decide which change to keep or combine both, remove the markers, then git add the files and complete with git commit (or git rebase --continue). Run the affected tests before pushing. Pull often and keep branches short-lived to reduce conflicts.
39
How have you handled disagreement with a developer about whether something is a bug?
Situation: a developer said a rounding difference in invoice totals was expected. Task: resolve it without friction. Action: I checked the requirement, found it specified rounding per line, and brought the document and a test case with expected values to a quick call with the BA. Result: the BA confirmed it was a bug, it was fixed, and we added the rule to the acceptance criteria.
A try block that automatically closes resources such as file readers or streams, preventing leaks without a finally block.
Tips to crack the State Bank of India Automation Testing interview
Follow official SBI recruitment notifications closely, as eligibility, exam pattern and stages change between recruitment cycles.
Prepare quantitative aptitude, reasoning, English and banking awareness thoroughly, practising full-length mock tests under exam timing.
For specialist IT officer roles, revise networking, databases, security and programming topics listed in the official syllabus.
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; State Bank of India interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the State Bank of India Automation Testing interview?
Candidates usually go through 4 stages: Preliminary online exam (for PO or clerk roles); Main online exam; Psychometric test, group exercise or interview; Document verification and final selection. 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 State Bank of India Automation Testing interview?
This practice set leans on Core Java for Testers (9), Page Object Model (6), REST Assured (5), Git, Maven and Jenkins (5). Revise those first, then practise explaining one or two of your own projects end to end, because most State Bank of India interviewers ask you to walk through real work.
Are these the exact questions asked at State Bank of India?
No. These are curated practice questions that match the skills and difficulty usually tested in banking & finance interviews like State Bank of India's. They are not a leaked or verified list of past questions.
Where does State Bank of India hire Automation Testing professionals in India?
State Bank of India has large teams in Mumbai, Navi Mumbai. Openings and locations change often, so check the State Bank of India careers page and filter by city and experience.
Automation Testing questions for similar companies