Skip to content

Genpact Automation Testing Interview Questions & Answers

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

About Genpact hiring for Automation Testing roles

Genpact is a professional services company that began as a unit of General Electric in India. It provides business process management, finance and accounting operations, analytics, data and AI services. In India it hires for process associates, business analysts, data analysts, data engineers and data scientists.

For Automation Testing roles, this Genpact practice set focuses most on API Testing and CI/CD (8), Selenium WebDriver (6), Core Java for Testers (6), Appium Mobile Automation (4). It has 15 easy, 22 medium, 3 hard questions, so you can start easy and work up to the harder ones.

Company type
IT services
Headquarters
New York, USA
Main India offices
Gurugram, Hyderabad, Bengaluru, Noida, Kolkata

Genpact Automation Testing interview process

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

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

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

Write Selenium code to verify that all links on a page are not broken.

Save to ▾
Show answer
List<WebElement> links = driver.findElements(By.tagName("a")); for (WebElement link : links) { String url = link.getAttribute("href"); if (url == null || !url.startsWith("http")) continue; HttpURLConnection con = (HttpURLConnection) new URL(url).openConnection(); con.setRequestMethod("HEAD"); int code = con.getResponseCode(); if (code >= 400) System.out.println("Broken: " + url + " " + code); }
02

How do you handle iframes?

Save to ▾
Show answer
switchTo().frame(index, name or element) enters the frame, and switchTo().defaultContent() returns to the main page.
03

What are appPackage and appActivity in Android automation?

Save to ▾
Show answer
appPackage is the unique application id of an Android app, such as com.example.shop, and appActivity is the activity screen that Appium launches first, such as .MainActivity. Together they let Appium start an app that is already installed without passing the apk path. You can find them with adb shell dumpsys window or by reading the manifest. A wrong activity name is a common reason a session fails to start.
04

What is the Hybrid framework?

Save to ▾
Show answer
A framework combining data-driven, keyword-driven and POM approaches with reporting and utilities, giving flexibility and reuse.
05

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

Tests run fine on Chrome but fail on Firefox at the same step. How do you investigate?

Save to ▾
Show answer
Rerun on Firefox with screenshots and logs. Common causes are timing differences, different default window sizes, unsupported CSS or JavaScript behaviour, alerts handled differently, or a driver version mismatch. Compare the DOM in both browsers at that step. Fix by using explicit waits, setting window size, and reporting genuine browser bugs to developers.
07

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

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

What are the advantages of version control for test code?

Save to ▾
Show answer
Git tracks changes, enables code review, branching and rollback and lets teams collaborate on the framework safely.
10

What are Maven profiles and how do you use them in automation?

Save to ▾
Show answer
Profiles are sets of configuration activated by name, such as -Pqa or -Pstaging, or by conditions. In automation they switch environment URLs, suite files, browsers or parallel settings without changing code. For example a regression profile sets suiteXml to regression.xml and threadCount to 4. Combined with properties files, profiles keep one codebase for every environment.
11

What is the difference between a Docker image and a container?

Save to ▾
Show answer
An image is a read-only template that contains an operating system layer, software and configuration, for example selenium/standalone-chrome with Chrome and ChromeDriver installed. A container is a running instance of an image with its own process, network and writable layer. You can start many containers from one image and destroy them after a test run. This is why every run starts from the same clean browser environment.
12

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

What are the UiAutomator2 and XCUITest drivers in Appium?

Save to ▾
Show answer
They are the platform drivers that actually control the device. UiAutomator2 drives Android by installing a small server app on the device that uses Google's UiAutomator framework. XCUITest drives iOS through Apple's XCTest framework via WebDriverAgent, which needs Xcode and signing for real devices. In Appium 2 they are installed separately with appium driver install, so each project picks only the drivers and versions it needs.
14

What is the difference between continuous delivery and continuous deployment?

Save to ▾
Show answer
In continuous delivery every change that passes the pipeline is ready to release, but a person approves the production deployment. In continuous deployment every passing change is released to production automatically. Continuous deployment requires very reliable automated tests and monitoring, because there is no manual check before users see the change.
15

How do you test an API that supports multiple versions at the same time?

Save to ▾
Show answer
First learn how versions are selected: URL path like /v1 and /v2, a header, or a query parameter. Keep a request specification per version and run the shared contract tests against each supported version, plus version-specific tests for new fields or changed behaviour. Check that old versions still return their original response shape so existing clients do not break, and that deprecated versions send the agreed deprecation headers or errors.
16

How do you switch between windows and tabs?

Save to ▾
Show answer
Get getWindowHandles(), loop to find the target, and call driver.switchTo().window(handle); switch back using the stored parent handle.
17

What is BDD and how does Cucumber work?

Save to ▾
Show answer
Behaviour-driven development writes scenarios in Given-When-Then Gherkin that map to step definitions in code, so business and QA share one language.
18

An element is visible in Appium Inspector but your test throws NoSuchElementException on the device. What do you check?

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

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

Tell me about a time you found a critical bug through automation.

Save to ▾
Show answer
Situation: during a sprint, my nightly regression showed checkout failing only for one payment option. Task: confirm if it was a test issue or a real bug. Action: I reproduced it manually, checked the API response and found a wrong tax value, then logged a clear defect with steps, logs and screenshots. Result: developers fixed it before the release and the test was added to the smoke suite.
21

A teammate compares two strings with == and the test sometimes passes and sometimes fails. Explain.

Save to ▾
Show answer
== compares object references, not content. String literals are interned, so two literals with the same text may share a reference and == returns true, but strings read from the UI or built at runtime are new objects, so == returns false even with the same text. Use equals() or equalsIgnoreCase() for content, and Objects.equals() to be null-safe.
22

What are the main OOP concepts in Java?

Save to ▾
Show answer
Encapsulation, inheritance, polymorphism and abstraction. Testers use them to build reusable page classes, base tests and utility libraries.
23

What is the Transaction Controller in JMeter used for?

Save to ▾
Show answer
A Transaction Controller groups several samplers into one logical business transaction, such as Login, which may include loading the page, posting credentials and fetching the dashboard. JMeter reports an extra sample with the total time of the group, so reports show user-level timings instead of only individual requests. With generate parent sample enabled the children appear nested. It makes SLA reporting easier for business stakeholders.
24

What is a smoke test versus a sanity test in a pipeline?

Save to ▾
Show answer
A smoke test is a broad, shallow check that the build is stable enough for further testing, such as the app launches, login works and main pages load. A sanity test is a narrow check after a specific fix or change to confirm it works. In pipelines, smoke runs on every deploy as a gate; sanity checks are targeted runs for a particular change.
25

How do you generate reports from Cucumber?

Save to ▾
Show answer
Configure plugins such as pretty for console, html:target/cucumber.html for a built-in report and json:target/cucumber.json for tools. The JSON feeds maven-cucumber-reporting or the Jenkins Cucumber Reports plugin. For richer dashboards, add the Allure or Extent Cucumber adapter. Attach screenshots and logs in hooks so failures can be analysed from the report alone.
26

What are relative locators in Selenium 4?

Save to ▾
Show answer
Locators such as above, below, toLeftOf and near that find elements by their position relative to another element.
27

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

How do you run Selenium tests in Docker containers in CI?

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

How do you validate response headers and cookies in REST Assured?

Save to ▾
Show answer
Use then().header("Content-Type", containsString("application/json")) and then().cookie("sessionId", notNullValue()). To read values, use response.getHeader("X-Request-Id") or response.getCookie("sessionId"). Header checks matter for caching, security headers like Strict-Transport-Security, and correlation IDs used when debugging failures across services. Also assert that sensitive headers such as server version details are not exposed.
30

What is the difference between == and equals() in Java?

Save to ▾
Show answer
== compares references (or primitive values); equals() compares content when overridden, as in String.
31

What is idempotency in REST APIs and why does it matter for testing?

Save to ▾
Show answer
An idempotent operation gives the same result no matter how many times it is called. GET, PUT and DELETE should be idempotent; POST usually is not. Testers verify that repeating a PUT does not create duplicates and that a second DELETE returns a sensible status like 404 or 204. Retries in networks and CI make idempotency important to verify.
32

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

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

How do you send form parameters and headers in REST Assured?

Save to ▾
Show answer
Use formParam("username", "asha") and formParam("password", "pass") for application/x-www-form-urlencoded bodies; REST Assured sets the content type for you. Add headers with header("X-Client", "web") or headers(map) for many at once. Cookies use cookie(name, value). Keep common headers in a RequestSpecification so individual tests only add what is specific to them.
35

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

What is the Maven build lifecycle?

Save to ▾
Show answer
The default lifecycle has phases in order: validate, compile, test, package, verify, install and deploy. Running a phase runs all earlier phases too, so mvn test compiles and then runs unit tests through Surefire. mvn verify also runs integration tests with Failsafe. There are also clean and site lifecycles. Automation suites usually run with mvn clean test or mvn clean verify.
37

Method overloading vs overriding?

Save to ▾
Show answer
Overloading: same method name, different parameters, in the same class (compile time). Overriding: a subclass redefines a parent method with the same signature (runtime polymorphism). WebDriver driver = new ChromeDriver() is runtime polymorphism.
38

What are TestNG and JUnit 5 differences that matter in automation?

Save to ▾
Show answer
TestNG has built-in groups, dependencies, suite XML, DataProvider and flexible parallel options, which suit large Selenium suites. JUnit 5 has a modular platform, tags, parameterized tests, extensions and strong IDE and tool support, and is the default for Spring and Cucumber's JUnit Platform engine. Both are capable; the choice usually follows team standards and existing frameworks.
39

How would you explain to a manager why mobile automation estimates are higher than web estimates?

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

Where do you use OOP concepts in your framework?

Save to ▾
Show answer
Encapsulation: private locators with public page methods. Inheritance: pages extend a BasePage. Polymorphism: the WebDriver interface for different browsers. Abstraction: utility layers hiding Selenium details.

Tips to crack the Genpact Automation Testing interview

  • Learn process improvement basics like Lean and Six Sigma, which have long been part of Genpact's operating style.
  • Revise Excel, SQL and basic statistics for analytics roles, with examples of reporting or automation you built.
  • Read about Genpact's origins at GE and its finance and accounting outsourcing business for company questions.
  • 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; Genpact interviewers usually ask follow-ups on your first answer.

Frequently asked questions

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

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

This practice set leans on API Testing and CI/CD (8), Selenium WebDriver (6), Core Java for Testers (6), Appium Mobile Automation (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Genpact interviewers ask you to walk through real work.

Are these the exact questions asked at Genpact?

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

Where does Genpact hire Automation Testing professionals in India?

Genpact has large teams in Gurugram, Hyderabad, Bengaluru, Noida, Kolkata. Openings and locations change often, so check the Genpact careers page and filter by city and experience.

Automation Testing questions for similar companies