Skip to content

Tata Elxsi Automation Testing Interview Questions & Answers

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

About Tata Elxsi hiring for Automation Testing roles

Tata Elxsi is a Tata Group design and technology services company that works on product engineering for the automotive, media and communications, and healthcare industries. Its teams build embedded software, set-top box and streaming solutions, medical device software and user experience designs. In India it hires software, embedded, testing and design engineers, with a notable development centre in Thiruvananthapuram's Technopark.

For Automation Testing roles, this Tata Elxsi practice set focuses most on Core Java for Testers (10), Selenium WebDriver (5), Git, Maven and Jenkins (4), Page Object Model (4). It has 17 easy, 22 medium, 1 hard questions, so you can start easy and work up to the harder ones.

Company type
IT services
Headquarters
Bengaluru, India
Main India offices
Bengaluru, Thiruvananthapuram, Chennai, Pune

Tata Elxsi Automation Testing interview process

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

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

Solved for Tata ElxsiStart 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

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
02

Write Java code to find the second largest number in an integer array.

Save to ▾
Show answer
public static int secondLargest(int[] nums) { int first = Integer.MIN_VALUE, second = Integer.MIN_VALUE; for (int n : nums) { if (n > first) { second = first; first = n; } else if (n > second && n != first) { second = n; } } if (second == Integer.MIN_VALUE) throw new IllegalArgumentException("No second largest"); return second; }
03

What is the difference between git reset --soft, --mixed and --hard?

Save to ▾
Show answer
All three move the current branch to another commit, but treat your changes differently. Soft keeps the changes staged, which is useful to squash recent commits. Mixed, the default, keeps the changes in the working folder but unstages them. Hard throws away staged and working changes completely, so use it carefully. Never reset commits that are already pushed to a shared branch; use git revert there instead.
04

How do you manage test data in a framework?

Save to ▾
Show answer
Use external files or APIs and database setup scripts, generate unique data per run, and clean up afterwards so tests stay independent.
05

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

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

What is TestNG and why is it used with Selenium?

Save to ▾
Show answer
A test framework offering annotations, grouping, prioritisation, parallel runs, data providers and reports, which structure and scale Selenium tests.
08

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

What are exceptions and how do you handle them?

Save to ▾
Show answer
Runtime events that disrupt flow. Use try-catch-finally, throw, throws, and custom exceptions; checked exceptions must be handled while unchecked ones need not be.
10

What is RemoteWebDriver and how is it different from ChromeDriver?

Save to ▾
Show answer
ChromeDriver starts and controls a browser on the same machine as the test. RemoteWebDriver sends the same WebDriver commands over HTTP to a remote endpoint, such as a Selenium Grid, a Docker container or a cloud provider, which starts the browser elsewhere. You pass the Grid URL and browser options, and the rest of the test code stays the same. ChromeDriver itself actually extends RemoteWebDriver.
11

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

Difference between final, finally and finalize?

Save to ▾
Show answer
final makes a variable, method or class unchangeable; finally is a block that always runs after try-catch; finalize is a deprecated method called before garbage collection.
13

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

What is dryRun in Cucumber and when do you use it?

Save to ▾
Show answer
dryRun=true makes Cucumber parse all feature files and check every step has a matching definition without actually executing anything. It is fast and is useful after writing new features, during refactoring, or as a quick CI gate to catch undefined or ambiguous steps. It also prints snippets for missing step definitions that you can paste and implement.
15

Why do Selenium browser containers need a larger shm_size?

Save to ▾
Show answer
Chrome and Firefox use shared memory at /dev/shm for rendering and inter-process communication. Docker gives containers only 64 MB of shared memory by default, which is not enough for modern pages, so the browser tab crashes with errors like session deleted because of page crash. Setting shm_size to 2g in Compose, or --shm-size=2g with docker run, fixes it. Mounting /dev/shm from the host is an alternative.
16

Write the command to run a JMeter test in non-GUI mode and generate the HTML report.

Save to ▾
Show answer
# -n non-GUI, -t test plan, -l results file, -e -o HTML dashboard folder jmeter -n -t tests/checkout.jmx \ -l results/checkout.jtl \ -e -o results/html-report \ -Jusers=100 -Jrampup=60 -Jduration=600 # generate a report later from an existing JTL jmeter -g results/checkout.jtl -o results/html-report-2
17

Describe a time you convinced developers to fix a problem found by automation.

Save to ▾
Show answer
Situation: an API test kept failing intermittently and developers called it a test issue. Task: prove or disprove it. Action: I collected logs from ten failures, showed the same race condition in the order service with request IDs, and reproduced it with a small parallel script. Result: developers fixed a real concurrency bug before it reached customers, and trust in the suite improved.
18

An assertion on element text fails even though the text looks identical on screen. What could be the reason?

Save to ▾
Show answer
The text may contain extra whitespace, a line break or a non-breaking space that looks normal visually. getText() also returns only visible text and applies CSS text-transform, so uppercase styling changes the value. Print the string with its length or character codes to spot hidden characters. Fix it by trimming and normalising whitespace before comparing, or compare with the expected case-insensitively when the UI uses text-transform.
19

What is the Page Object Model and what problem does it solve?

Save to ▾
Show answer
POM is a design pattern where each page or component of the application has a class holding its locators and the actions a user can perform there, such as login() or searchProduct(). Tests call these methods instead of using Selenium directly. When the UI changes, you update one page class instead of dozens of tests, which reduces duplication and makes tests readable.
20

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

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

What do HTTP status codes 200, 201, 400, 401, 403, 404 and 500 mean?

Save to ▾
Show answer
200 OK, 201 Created, 400 bad request, 401 unauthenticated, 403 forbidden, 404 not found and 500 server error.
23

What are JMeter listeners and why should you avoid most of them during a load run?

Save to ▾
Show answer
Listeners collect and display results, such as View Results Tree, Summary Report and Aggregate Report. Visual listeners keep every sample in memory and redraw graphs, which consumes a lot of CPU and RAM and can make JMeter itself the bottleneck. During real load runs disable them, run in non-GUI mode, write raw results to a JTL file and generate the HTML dashboard afterwards. Use View Results Tree only for debugging.
24

What is the test pyramid and how does it guide automation?

Save to ▾
Show answer
The pyramid suggests many fast unit tests at the base, fewer API or service tests in the middle and a small number of UI end-to-end tests at the top. Lower-level tests are faster and less flaky. An inverted pyramid with mostly UI tests leads to slow, brittle pipelines. Use it as a guide to put each check at the cheapest level that still catches the bug.
25

What is the difference between a declarative and a scripted Jenkins pipeline?

Save to ▾
Show answer
Declarative pipelines use a fixed structure: pipeline, agent, stages, steps, post, with built-in options and validation; they are easier to read and are the recommended default. Scripted pipelines use node blocks and full Groovy, giving more flexibility for complex logic but making them harder to maintain. Most test pipelines use declarative syntax with small script blocks only where needed.
26

How do you pass parameters like browser and environment from Maven to your tests?

Save to ▾
Show answer
Pass system properties on the command line, for example mvn test -Dbrowser=firefox -Denv=qa. Read them in Java with System.getProperty("browser", "chrome"), giving a default. Surefire forwards -D properties to the forked test JVM, or you can declare them under systemPropertyVariables. Jenkins can expose these as build parameters so testers choose browser and environment per run.
27

What is the use of the this and super keywords?

Save to ▾
Show answer
this refers to the current object; super refers to the parent class, used to call parent constructors and methods.
28

How do you run the same test with data from Excel using a DataProvider?

Save to ▾
Show answer
Write a utility that reads the sheet with Apache POI and returns Object[][] with one row per test case. Create a @DataProvider method that calls the utility, and set dataProvider = "loginData" on the test. Each row runs as a separate test with its own result. Keep the file in src/test/resources and consider CSV or JSON, which are easier to review in Git.
29

How does HashMap work internally?

Save to ▾
Show answer
It uses the key's hashCode to find a bucket and equals to resolve collisions, giving O(1) average lookups; Java 8 converts long buckets into trees.
30

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().
31

How do you handle dynamic elements whose ids change?

Save to ▾
Show answer
Use CSS or XPath with contains(), starts-with() or stable attributes, relative axes, or data-test attributes agreed with developers.
32

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

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

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

Write a Dockerfile that runs a Maven and TestNG test suite.

Save to ▾
Show answer
FROM maven:3.9-eclipse-temurin-21 WORKDIR /app # cache dependencies first for faster rebuilds COPY pom.xml . RUN mvn -q dependency:go-offline COPY src ./src COPY testng.xml . ENV GRID_URL=http://selenium-hub:4444 CMD ["sh", "-c", "mvn test -Dgrid.url=$GRID_URL -Dsurefire.suiteXmlFiles=testng.xml"]
36

How do you structure packages in a Selenium POM framework?

Save to ▾
Show answer
A common layout: src/main/java with pages, components, base, utils, config and drivers packages; src/test/java with tests grouped by feature, plus listeners; src/test/resources with testng.xml, config properties per environment, test data and log configuration. Keep framework code separate from tests so it can be reused, and keep each package focused on one responsibility.
37

What is the difference between average, median and 95th percentile response time?

Save to ▾
Show answer
Average is the sum divided by count, so a few very slow requests can distort it. Median is the middle value, meaning half the requests were faster. The 95th percentile means 95 percent of requests were faster than that value, which reflects what most users experience including slow cases. SLAs are usually written on 90th, 95th or 99th percentiles because averages hide long tails that frustrate real users.
38

What are access modifiers in Java?

Save to ▾
Show answer
public (everywhere), protected (package and subclasses), default (package) and private (same class), used to control visibility of test utilities.
39

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

What is the @Factory annotation in TestNG?

Save to ▾
Show answer
@Factory creates test class instances dynamically, each with different constructor data, so all tests in the class run once per instance. For example a factory can create LoginTests for chrome and firefox. It differs from DataProvider, which runs one method many times with different arguments. Factory is useful when a whole class should repeat for each configuration.

Tips to crack the Tata Elxsi Automation Testing interview

  • Revise C, C++ or Python fundamentals along with operating systems and networking basics for embedded and media engineering roles.
  • Prepare a crisp walkthrough of your best project, focusing on the problem, your contribution and what you would improve now.
  • Read about Tata Elxsi's work in automotive software, video streaming and medical devices to show real interest in its domains.
  • 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; Tata Elxsi interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Tata Elxsi Automation Testing interview?

Candidates usually go through 4 stages: Online assessment (aptitude + technical); 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 Tata Elxsi Automation Testing interview?

This practice set leans on Core Java for Testers (10), Selenium WebDriver (5), Git, Maven and Jenkins (4), Page Object Model (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Tata Elxsi interviewers ask you to walk through real work.

Are these the exact questions asked at Tata Elxsi?

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

Where does Tata Elxsi hire Automation Testing professionals in India?

Tata Elxsi has large teams in Bengaluru, Thiruvananthapuram, Chennai, Pune. Openings and locations change often, so check the Tata Elxsi careers page and filter by city and experience.

Automation Testing questions for similar companies