Skip to content

Juspay Automation Testing Interview Questions & Answers

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

About Juspay hiring for Automation Testing roles

Juspay is a Bengaluru-based payments technology company that builds payment orchestration, checkout and UPI infrastructure for merchants and banks. Its products help businesses manage multiple payment gateways and improve transaction success rates. It is known for using functional programming languages such as Haskell and PureScript, and hires software engineers and product engineers.

For Automation Testing roles, this Juspay practice set focuses most on Selenium WebDriver (8), REST Assured (6), Selenium Grid & Docker (5), Core Java for Testers (4). It has 4 easy, 29 medium, 7 hard questions, so you can start easy and work up to the harder ones.

Company type
Fintech
Headquarters
Bengaluru, India
Main India offices
Bengaluru

Juspay Automation Testing interview process

  1. Online coding assessment or hackathon-style challenge
  2. Technical round 1 (problem solving)
  3. Technical round 2 (design or functional programming)
  4. Hiring manager and culture round

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

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

A click works locally but throws ElementClickInterceptedException in CI. How do you fix it?

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

Chrome inside a Docker node keeps crashing with session deleted because of page crash. How do you fix it?

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

How do you calculate automation ROI?

Save to ▾
Show answer
Compare effort saved by running automated tests repeatedly against the cost of building and maintaining scripts, counting execution time, defects found earlier and release speed.
05

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

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
07

What is Selenium Grid and why use it?

Save to ▾
Show answer
It runs tests in parallel across multiple machines and browsers using a hub and nodes, cutting execution time and increasing browser coverage.
08

How do you avoid page object classes becoming too large?

Save to ▾
Show answer
Split pages into components for repeated or complex areas, keep only user actions as public methods, move generic helpers to BasePage or utilities, and avoid one method per element. If a page has distinct modes like view and edit, use separate classes. Review page classes during code review and refactor when they cross a few hundred lines.
09

What are the standalone, hub and node, and distributed modes of Selenium Grid 4?

Save to ▾
Show answer
Standalone runs every Grid component and a local node in a single process, which suits a laptop or a single container. Hub and node mode runs the router, distributor, queue and session map together as the hub, with separate node processes registering to it, which is the usual team setup. Fully distributed mode runs each component separately, often on Kubernetes, for very large grids that need independent scaling and high availability.
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 are Java 8 streams and lambdas?

Save to ▾
Show answer
Lambdas are short anonymous functions; streams process collections declaratively with filter, map and collect, for example filtering link text from a list of elements.
12

Tests running inside Docker cannot reach the application running on the host's localhost. Why, and how do you fix it?

Save to ▾
Show answer
Inside a container, localhost means the container itself, not the host machine. On Docker Desktop use host.docker.internal as the host name. On Linux add extra_hosts with host.docker.internal:host-gateway, or use the host's IP. A cleaner option is running the application in the same Compose network and calling it by its service name, such as http://web:8080. Make sure the app listens on 0.0.0.0, not only 127.0.0.1.
13

Developers changed a field from a number to a string and your tests did not catch it. How do you prevent this?

Save to ▾
Show answer
Add JSON schema validation for key responses so type changes fail immediately, and deserialize into typed POJOs, which fail when types do not match. For services with multiple consumers, introduce contract tests so providers learn about breaks before deploying. Also ask for API changes to be shared in pull requests or a changelog that QA reviews.
14

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"));
15

How do you verify that an element is displayed, enabled or selected?

Save to ▾
Show answer
Use isDisplayed(), isEnabled() and isSelected() on the WebElement before interacting or asserting.
16

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

What does SE_NODE_MAX_SESSIONS control in the Docker Selenium images?

Save to ▾
Show answer
It sets how many browser sessions a node container can run at once. The default is one, which gives the best isolation and stability. Increasing it lets one container run several browsers in parallel, but you must also set SE_NODE_OVERRIDE_MAX_SESSIONS to true and give the container enough CPU, memory and shared memory. Many teams keep one session per container and scale the number of containers instead.
18

Tell me about a time your API tests caught a breaking change before the UI tests did.

Save to ▾
Show answer
Situation: a backend team renamed a response field during a refactor. Task: our nightly REST Assured suite had to protect the mobile and web clients. Action: schema validation failed within minutes of the merge, and I shared the failing response and the contract with the developer. Result: the field was restored with a deprecation plan before the UI suite even ran, and the team added our schema tests to their pull request checks.
19

Why is JSR223 with Groovy preferred over BeanShell in JMeter?

Save to ▾
Show answer
JSR223 elements with Groovy compile scripts once and cache them, so they run much faster and use less CPU under load. BeanShell is interpreted on every call and becomes a bottleneck at high thread counts. Groovy also supports modern Java syntax and is the default JSR223 language. Enable caching by keeping the cache compiled script option on and passing values through vars or parameters, not by embedding ${} inside the script.
20

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

Write a JSR223 Groovy PostProcessor that reads a JSON response and stores a value as a JMeter variable.

Save to ▾
Show answer
// JSR223 PostProcessor, language: groovy import groovy.json.JsonSlurper def body = prev.getResponseDataAsString() def json = new JsonSlurper().parseText(body) if (json?.orderId) { vars.put('orderId', json.orderId.toString()) } else { prev.setSuccessful(false) prev.setResponseMessage('orderId missing in response') }
22

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

How do you test a responsive page in a mobile viewport using Selenium?

Save to ▾
Show answer
For layout checks you can set the window size, like driver.manage().window().setSize(new Dimension(390, 844)). For closer emulation in Chrome use mobile emulation in ChromeOptions: options.setExperimentalOption("mobileEmulation", Map.of("deviceName", "Pixel 7")), which also sets the user agent, pixel ratio and touch events. This catches responsive layout bugs quickly, but it is not a replacement for testing on real mobile browsers.
24

How do you test that a method throws an expected exception in TestNG?

Save to ▾
Show answer
Use @Test(expectedExceptions = IllegalArgumentException.class) and optionally expectedExceptionsMessageRegExp to check the message. The test passes only if that exception is thrown. For more control, use Assert.assertThrows(IllegalArgumentException.class, () -> service.withdraw(-5)), which returns the exception so you can inspect it further. This style is clearer because the check applies to one line, not the whole test.
25

Reverse a string in Java.

Save to ▾
Show answer
String r = new StringBuilder(s).reverse().toString(); // or loop from the last index and append each character
26

Tell me about a time you had to choose between Selenium and another tool for a project.

Save to ▾
Show answer
Situation: a new project team asked whether to keep Selenium or switch tools. Task: recommend an option with evidence. Action: I ran a two-week proof of concept automating the same five flows in both, compared stability, run time, team skills and Grid support, and shared the results. Result: we kept Selenium with Java for the existing team skills and Grid setup, and adopted better waits and parallel runs from the trial.
27

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

How do you handle an element inside a shadow DOM in Selenium 4?

Save to ▾
Show answer
Find the shadow host element, then call getShadowRoot() to get a SearchContext, and search inside it with CSS selectors: driver.findElement(By.cssSelector("my-app")).getShadowRoot().findElement(By.cssSelector("#submit")). XPath does not work inside shadow roots. For nested shadow roots, repeat the step for each host. Closed shadow roots cannot be accessed this way.
29

Why is XPath slow in Appium and what should you use instead?

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

How do you run tests on multiple browsers in parallel in Jenkins?

Save to ▾
Show answer
Use a parallel block in the pipeline with a stage per browser, or a matrix directive with axis BROWSER values chrome, firefox and edge. Each branch runs mvn test -Dbrowser=${BROWSER}, ideally against Selenium Grid or containers so agents do not need local browsers. Publish results per branch with clear names so failures show which browser broke.
31

How do you publish Allure or Extent reports from Jenkins?

Save to ▾
Show answer
For Allure, install the Allure Jenkins plugin, configure the commandline tool, and add allure results: [[path: 'target/allure-results']] in the post always block. For Extent, archive the HTML file and use the HTML Publisher plugin to show it as a build link. Keep report history per build and share the link in failure notifications.
32

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

Tell me about a time you set up test infrastructure that other teams started using.

Save to ▾
Show answer
Situation: three product teams each kept their own unstable Grid VMs. Task: provide one reliable shared Grid. Action: I set up a Docker-based Grid with pinned images, health checks, video for failures and a short onboarding guide, then ran a pilot with one team and fixed their issues before opening it up. Result: all three teams moved within a quarter, VM costs dropped and Grid-related failures fell sharply.
34

How do you handle a web table in Selenium?

Save to ▾
Show answer
Locate rows and columns with XPath such as //table//tr and //td, loop through them to read or click cells, or build the XPath dynamically from the row text.
35

How do you resolve a merge conflict in Git?

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

How do you validate a JSON response in REST Assured?

Save to ▾
Show answer
Use then().statusCode(200).body("data.id", equalTo(5)), or extract() the response and assert fields with JsonPath.
37

How do you run Cucumber scenarios in parallel?

Save to ▾
Show answer
With TestNG, extend AbstractTestNGCucumberTests and override scenarios() with @DataProvider(parallel = true), then set data-provider-thread-count. With JUnit 5, set cucumber.execution.parallel.enabled=true in junit-platform.properties. Each scenario must own its WebDriver, usually through a ThreadLocal or a per-scenario DI context, and test data must not clash. Parallelism is per scenario, not per step.
38

Tell me about a time a BDD conversation clarified a requirement before development started.

Save to ▾
Show answer
Situation: a story said users get a refund if an order is cancelled early. Task: write scenarios with the product owner and developer. Action: while writing examples I asked what early meant and whether shipped orders counted. The three of us found the story had no time limit and no rule for partial shipments, and we wrote four concrete scenarios. Result: the rules were fixed before coding, avoiding a rework that had happened in a previous sprint.
39

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

Your Jenkins test stage marks the build green even though tests failed. Why?

Save to ▾
Show answer
Possibly testFailureIgnore is set to true in Surefire, the shell step uses || true, or the script swallows Maven's exit code. Sometimes tests catch exceptions and never fail. Check the console log for Maven's BUILD result and Surefire summary. Fix the configuration so failures produce a non-zero exit, or use junit publishing to mark the build unstable when tests fail.

Tips to crack the Juspay Automation Testing interview

  • Practise DSA problems seriously, since Juspay hiring challenges are known to be competitive and focused on problem-solving ability.
  • Learn functional programming basics like immutability, pure functions and recursion, and try a little Haskell or PureScript.
  • Understand UPI and card payment flows, including authorisation and settlement, to discuss the domain with confidence.
  • 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; Juspay interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Juspay Automation Testing interview?

Candidates usually go through 4 stages: Online coding assessment or hackathon-style challenge; Technical round 1 (problem solving); Technical round 2 (design or functional programming); Hiring manager and culture 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 Juspay Automation Testing interview?

This practice set leans on Selenium WebDriver (8), REST Assured (6), Selenium Grid & Docker (5), Core Java for Testers (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Juspay interviewers ask you to walk through real work.

Are these the exact questions asked at Juspay?

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

Where does Juspay hire Automation Testing professionals in India?

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

Automation Testing questions for similar companies