Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Bajaj Finserv hiring for Automation Testing roles
Bajaj Finserv is a Pune-based financial services group, part of the Bajaj Group, with businesses in lending, insurance and investments. Its subsidiary Bajaj Finance is a large non-banking finance company known for consumer durable loans, personal loans and EMI cards. It hires for credit, risk, analytics, sales and technology roles, including data and digital product teams.
For Automation Testing roles, this Bajaj Finserv practice set focuses most on TestNG Framework (6), Core Java for Testers (6), Page Object Model (5), Appium Mobile Automation (5). It has 1 easy, 34 medium, 5 hard questions, so you can start easy and work up to the harder ones.
Company type
Fintech
Headquarters
Pune, India
Main India offices
Pune
Bajaj Finserv Automation Testing interview process
Online assessment or resume screening
Functional or technical interview
Managerial round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for Bajaj FinservStart 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.
Use official Selenium images, either standalone-chrome for simple runs or a Grid with hub and node containers via Docker Compose. The test container or Jenkins agent points RemoteWebDriver to http://selenium-hub:4444. Containers give the same browser version everywhere and are cleaned after each run. Add shm_size for Chrome stability and record videos for failed tests if needed.
03
A developer changed the UI and 40 tests failed with NoSuchElementException. How does POM help here?
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.
04
What is the Optional class in Java and where is it useful in test code?
Optional is a container that may or may not hold a value, introduced in Java 8 to avoid returning null. In test code it suits lookups that can legitimately find nothing, such as finding a row in a table or reading an optional config key. Callers use orElse, orElseThrow or ifPresent instead of null checks. For example, findRowByName(name).orElseThrow(() -> new AssertionError(name + " not found")) gives a clear failure message.
05
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.
Comparable defines the natural order inside the class (compareTo); Comparator defines custom orders externally (compare), useful for sorting test data in several ways.
Headless mode or screen resolution, timing issues, environment data, missing dependencies, browser–driver version mismatch or parallel conflicts. Check logs and failure screenshots and make waits robust.
09
Your code review shows a test class with 30 copy-pasted lines in every method. How do you refactor it with Java features?
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.
Automate stable, repetitive, high-risk and data-heavy flows (smoke, regression). Skip one-time tests, frequently changing UI and checks needing human judgement. Compare run frequency × manual time with build and maintenance cost.
11
Why is XPath slow in Appium and what should you use instead?
For every XPath query Appium must fetch the full page source of the app, convert it into an XML document and then evaluate the expression, which can take seconds on large screens and is even slower on iOS. Index-based XPath also breaks when layouts change. Use accessibility id first, then resource-id, Android UiAutomator selectors or iOS predicate strings and class chains, which are evaluated natively on the device and are much faster.
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.
13
How do you make WebDriver thread-safe for parallel runs?
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.
15
What is ITestContext in TestNG and how can you use it to share data?
ITestContext represents one test tag from testng.xml and is passed to listeners and configuration methods. It holds the suite, included methods and results, and has setAttribute and getAttribute to share values, such as an auth token created in @BeforeTest and read by later classes. Because it is shared by every thread in that test tag, store only thread-safe or read-only data there, not WebDriver instances during parallel runs.
16
How do you use Cucumber with REST Assured for API BDD tests?
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.
17
Your recorded JMeter script fails with 403 on every request after login. What is the likely cause?
The script is probably replaying hard-coded dynamic values, such as a CSRF token, session cookie or auth header captured during recording. The server rejects them because they belong to the old session. Add an HTTP Cookie Manager so cookies are handled per thread, extract the CSRF or bearer token from the login response with an extractor, and replace the recorded value with the variable. Verify with View Results Tree on one thread.
18
Which locator strategies does Appium support and which should you prefer?
Appium supports accessibility id, id (resource-id on Android), class name, XPath, Android UiAutomator selectors, iOS predicate strings and iOS class chains. Prefer accessibility id because it is fast, works across Android and iOS and also improves app accessibility. Next use resource-id or iOS predicates. Use XPath only as a last resort because it walks the whole UI tree and is slow and brittle, especially on iOS.
19
Write a REST Assured test using RequestSpecBuilder and ResponseSpecBuilder.
Check CPU and memory usage of application servers, garbage collection pauses and heap usage for Java services, thread pool and connection pool saturation, database slow queries, locks and connection counts, disk I/O and network bandwidth. Also look at load balancer and cache hit rates and error logs. Correlate the timestamp of the slowdown with these graphs in an APM or monitoring tool to find which resource saturated first.
21
How do you handle a dropdown that is not a <select> tag?
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.
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.
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.
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.
27
Parallel TestNG runs open browsers that interact with each other's tests. How do you fix it?
The WebDriver is shared, probably through a static field. Replace it with a ThreadLocal<WebDriver> in a DriverManager, create the driver in @BeforeMethod and call quit() and remove() in @AfterMethod(alwaysRun = true). Make page objects take the driver from the current thread. Also check test data, reports and loggers are thread-safe.
28
How do you verify response time and headers in REST Assured?
// 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();
30
Nightly Jenkins regression runs take 4 hours. How would you bring it down?
Measure first: find the slowest tests and setup steps. Then run tests in parallel across Grid nodes or containers, replace UI setup with API calls, remove duplicate coverage, move checks down to API level, split the suite into shards across agents, and cache Maven dependencies. Aim for a smoke stage under 15 minutes on every commit and a parallel regression under an hour.
31
How do you read data from Excel or properties files in Java?
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.
33
How do you pass thread count and duration to a JMeter test from the command line?
// In the Thread Group fields use property functions with defaults
Number of Threads: ${__P(users,10)}
Ramp-up period: ${__P(rampup,30)}
Duration (seconds): ${__P(duration,300)}
// Then override them when running
jmeter -n -t load.jmx -l out.jtl -Jusers=200 -Jrampup=120 -Jduration=1800
34
Write a TestNG listener that logs test start and failure.
String parent = driver.getWindowHandle();
for (String h : driver.getWindowHandles())
if (!h.equals(parent)) driver.switchTo().window(h);
// ...then switch back to parent
36
Describe a time you improved the maintainability of an automation framework.
Situation: our suite had duplicated locators across 200 tests and each UI release broke many of them. Task: reduce maintenance effort. Action: I introduced page objects and components for the top ten pages, added data-testid attributes with the developers and wrote a short guide. Result: fixing a UI change went from half a day to under an hour, and new joiners wrote tests faster.
37
Chrome inside a Docker node keeps crashing with session deleted because of page crash. How do you fix it?
This is almost always shared memory exhaustion, because Docker's default /dev/shm of 64 MB is too small for Chrome. Set shm_size: 2gb in Compose or --shm-size=2g in docker run. Also check the container's memory limit and the number of sessions per node, since several browsers in one container multiply memory use. Heavy pages or memory leaks in long sessions can also crash tabs, so restart sessions between test classes.
38
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.
39
Write a Java stream that extracts and sorts product prices from a list of WebElements.
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.
Tips to crack the Bajaj Finserv Automation Testing interview
Learn lending basics such as credit scores, EMI calculation, interest rates and loan approval processes before the interview.
For analytics and risk roles, revise SQL, Excel and basic statistics, and discuss how data helps assess credit risk.
Understand the difference between a bank and an NBFC and know Bajaj Finserv's main product lines.
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; Bajaj Finserv interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Bajaj Finserv 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 Bajaj Finserv Automation Testing interview?
This practice set leans on TestNG Framework (6), Core Java for Testers (6), Page Object Model (5), Appium Mobile Automation (5). Revise those first, then practise explaining one or two of your own projects end to end, because most Bajaj Finserv interviewers ask you to walk through real work.
Are these the exact questions asked at Bajaj Finserv?
No. These are curated practice questions that match the skills and difficulty usually tested in fintech interviews like Bajaj Finserv's. They are not a leaked or verified list of past questions.
Where does Bajaj Finserv hire Automation Testing professionals in India?
Bajaj Finserv has large teams in Pune. Openings and locations change often, so check the Bajaj Finserv careers page and filter by city and experience.
Automation Testing questions for similar companies