Skip to content

Automation Testing Interview Questions in Kolkata

36 practice questions with answers for Automation Testing interviews in Kolkata.

Automation Testing jobs in Kolkata

Kolkata has a steady IT-services and BFSI technology job market around Salt Lake Sector V and New Town. Many openings are with service companies and their delivery centres, with a focus on strong fundamentals.

Below are 36 questions that match the mix of service, product and domain employers hiring automation testers in Kolkata.

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

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

How do you upload a file with REST Assured?

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

What are generics in Java and how do they help in a test framework?

Save to ▾
Show answer
Generics let classes and methods work with a type parameter while keeping compile-time type safety, such as List<String> or a method <T> T readJson(String path, Class<T> type). In a framework they let you write one reusable helper for many types, for example a generic API client that deserializes responses into any POJO, or a BasePage method that returns the correct page type for chaining. They remove casts and catch type errors at compile time.
04

What is Selenium and what are its components?

Save to ▾
Show answer
An open-source suite for browser automation: WebDriver, IDE, Grid and the older RC. WebDriver controls browsers through their native drivers.
05

How do you handle alerts and pop-ups?

Save to ▾
Show answer
driver.switchTo().alert() lets you accept, dismiss, read text or send keys. Browser windows are handled with window handles.
06

Tell me about a time a flaky test cost your team time and how you fixed it permanently.

Save to ▾
Show answer
Situation: a checkout test failed about one run in five and the team started ignoring red builds. Task: fix the root cause, not just rerun it. Action: I added logs and screenshots, found it raced with an async price recalculation, replaced a fixed sleep with a wait on the updated total and asked developers for a loading flag. Result: zero failures in the next sixty runs, and the team trusted red builds again.
07

What are the Actions class use cases?

Save to ▾
Show answer
Mouse and keyboard actions such as hover, drag and drop, double click, right click and key combinations, built with moveToElement(...).perform().
08

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

Why do you want to work as an automation tester rather than a manual tester?

Save to ▾
Show answer
Situation: in my internship I repeated the same regression checks every release. Task: I wanted to free time for exploratory testing. Action: I learnt Selenium and Java and automated our login and search regression in my spare time. Result: the checks went from two hours to ten minutes, and I realised I enjoy building tools that improve quality, which is why I want this role.
10

What is a BasePage and what should it contain?

Save to ▾
Show answer
BasePage is a parent class for all page objects holding common things: the driver reference, a WebDriverWait, and helper methods such as click with wait, type, getText, waitForVisible and scrollIntoView. Child pages extend it and stay focused on page-specific locators and actions. Keep it small; if it grows into hundreds of methods, move helpers into separate utility classes using composition.
11

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

How do you handle test data cleanup in Cucumber scenarios?

Save to ▾
Show answer
Create data in Given steps through APIs, record the created IDs in the scenario context, and delete them in an @After hook, which runs even when the scenario fails. Use unique names with a timestamp or UUID to avoid clashes in parallel runs. For shared environments, add a nightly cleanup job for leftover data tagged with a test prefix.
13

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
14

What is JsonPath and how do you use it for nested JSON?

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

What locators does Selenium support?

Save to ▾
Show answer
id, name, className, tagName, linkText, partialLinkText, CSS selector and XPath. Prefer stable ids or CSS, using XPath when needed.
16

Your price comparison test fails because 19.99 + 0.01 is not equal to 20.0. Why?

Save to ▾
Show answer
double uses binary floating point, which cannot represent many decimal values exactly, so small rounding errors appear. For money, use BigDecimal created from strings and compare with compareTo(), or compare doubles with a tolerance such as Assert.assertEquals(actual, expected, 0.001). Also strip currency symbols and commas before parsing UI text.
17

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

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

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

How do you switch between native and webview contexts in a hybrid app?

Save to ▾
Show answer
// Requires the webview to be debuggable in the app build Set<String> contexts = driver.getContextHandles(); for (String ctx : contexts) { if (ctx.startsWith("WEBVIEW")) { driver.context(ctx); break; } } driver.findElement(By.cssSelector("#email")).sendKeys("qa@test.com"); // back to native controls driver.context("NATIVE_APP");
21

What are page components or page fragments in POM?

Save to ▾
Show answer
Components are classes for UI parts that repeat across pages, such as the header, search bar, date picker or a data table. A page object then has-a component: homePage.header().search("laptop"). This follows composition over inheritance, avoids duplicate locators and matches modern component-based frontends. Components are usually scoped to a root WebElement so locators search only inside that element.
22

What are the disadvantages of POM?

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

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

What do number of threads, ramp-up period and loop count mean in a JMeter Thread Group?

Save to ▾
Show answer
Number of threads is how many virtual users run in parallel. Ramp-up period is the time JMeter takes to start all of them, so 100 threads with a 50-second ramp-up starts two users per second. Loop count is how many times each user repeats the samplers, or you can set a duration instead. A gradual ramp-up avoids an unrealistic burst at the start and shows where response times begin to degrade.
25

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

Write a TestNG listener that logs test start and failure.

Save to ▾
Show answer
public class LogListener implements ITestListener { @Override public void onTestStart(ITestResult r) { System.out.println("START: " + r.getMethod().getMethodName()); } @Override public void onTestFailure(ITestResult r) { System.out.println("FAIL: " + r.getName() + " - " + r.getThrowable()); } } // register with @Listeners(LogListener.class) or <listeners> in testng.xml
27

What is data-driven testing?

Save to ▾
Show answer
Running the same test logic with multiple data sets from Excel, CSV, JSON or a database, so coverage increases without duplicating code.
28

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

What is a step definition in Cucumber?

Save to ▾
Show answer
A step definition is a Java method annotated with @Given, @When or @Then whose expression matches a Gherkin step. When Cucumber runs a feature, it finds the matching method and executes it, passing captured parameters as arguments. Keep step definitions thin: they should call page objects or API helpers rather than contain Selenium code directly, so the same steps stay reusable across many features.
30

Which reporting tools do you use?

Save to ▾
Show answer
TestNG reports, ExtentReports and Allure give charts, screenshots and logs that are easy to share with the team.
31

After aborted Jenkins builds, Grid slots stay busy and new tests wait. How do you handle it?

Save to ▾
Show answer
When a build is killed, driver.quit() never runs, so sessions stay open until the node notices. Set a sensible session timeout on nodes, such as SE_NODE_SESSION_TIMEOUT of 300 seconds, so idle sessions are cleaned up. Always call quit in an @AfterMethod with alwaysRun or a finally block. In CI, bring the Compose Grid up per build and tear it down in a post always step, so each build gets a fresh Grid.
32

How do you measure and assert API response time in REST Assured?

Save to ▾
Show answer
Use then().time(lessThan(2000L)) for a quick check or response.getTimeIn(TimeUnit.MILLISECONDS) to log the value. This measures client-side time, including network, so set generous thresholds and treat it as a smoke signal, not a performance test. For real load and latency percentiles, use tools such as JMeter, Gatling or k6.
33

Should every test in a project be written in Cucumber?

Save to ▾
Show answer
No. Cucumber adds a translation layer, so it is worth it for business-facing acceptance tests that stakeholders discuss. Unit tests, low-level API checks, data validations and technical edge cases are faster to write and maintain directly in TestNG or JUnit. A healthy project uses Cucumber for a focused set of key behaviours and plain code tests for everything else.
34

Your CI pipeline is blocked because a downstream service needed for API tests is often down. What do you do?

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

What are wrapper classes in Java?

Save to ▾
Show answer
Classes such as Integer and Double that wrap primitive types as objects, needed for collections and for parsing text from web elements.
36

A file download test passes locally but fails in a Grid node. How do you approach it?

Save to ▾
Show answer
The file is saved on the remote node, not the machine running the test, so the test cannot find it locally. Options are enabling Selenium Grid's managed downloads with se:downloadsEnabled and fetching the file through the Grid API, sharing a mounted volume with the container, or verifying the download by requesting the file URL with an HTTP client and checking status, size and type.

Companies with offices in Kolkata (8)

Frequently asked questions

Which companies hire Automation Testing professionals in Kolkata?

Companies with large offices in Kolkata include Wipro, Cognizant, IBM, EY, PwC, Genpact, Grant Thornton Bharat, Ericsson. Use their company pages below to practise employer-specific sets.

Are Automation Testing interviews in Kolkata different from other cities?

The questions depend more on the company than the city. Kolkata's mix of employers decides the style: Many openings are with service companies and their delivery centres, with a focus on strong fundamentals

How do I find Automation Testing jobs in Kolkata?

Shortlist companies with Kolkata offices, keep your CV focused on Automation Testing projects, apply on company career pages and job portals with the Kolkata filter, and practise the questions on this page before each interview.