Skip to content

Automation Testing Interview Questions in Thiruvananthapuram

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

Automation Testing jobs in Thiruvananthapuram

Thiruvananthapuram's Technopark is one of India's oldest IT parks, hosting IT-services, product and engineering-services companies. Data and testing teams here often work with global clients in finance, travel and healthcare.

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

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

How do you include and exclude groups in testng.xml?

Save to ▾
Show answer
Inside a <test>, add <groups><run><include name="smoke"/><exclude name="broken"/></run></groups>. Only methods in the included groups run, minus excluded ones. Configuration methods must have alwaysRun = true or belong to the groups, or they will be skipped. You can also pass -Dgroups=smoke from Maven Surefire for CI selection.
02

Your Selenium tests in CI produce blank screenshots in headless mode. What could be wrong?

Save to ▾
Show answer
The screenshot may be taken before the page renders, the window size in headless mode may be tiny, or the browser is crashing due to low shared memory in Docker. Set --window-size=1920,1080, use the new headless mode, wait for page content before capturing, and add --disable-dev-shm-usage or a larger shm size for containers.
03

How do you record a JMeter script with the HTTP(S) Test Script Recorder?

Save to ▾
Show answer
Add the recorder from Templates using the Recording template, which also creates a Thread Group and Recording Controller. Start the recorder on port 8888, set your browser or system proxy to localhost:8888 and import the ApacheJMeterTemporaryRootCA certificate so HTTPS works. Perform the user journey, then stop. Afterwards remove static resources and third-party calls, add correlation for dynamic values, parameterize data and add think time.
04

How do you watch a test running inside a Docker Selenium container?

Save to ▾
Show answer
The selenium node and standalone images include a VNC server and noVNC. Expose port 7900 and open http://localhost:7900 in a browser; the default password is secret, or set SE_VNC_NO_PASSWORD to skip it. You can also open the Grid UI on port 4444 and click the session's video icon. This is very useful for debugging tests that fail only inside the container, such as layout or focus problems.
05

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

How do you test an API that depends on another service that is down?

Save to ▾
Show answer
Use mocks or stubs such as WireMock to simulate the dependency and test your service in isolation.
07

How do you pass the WebDriver to page objects in a parallel framework?

Save to ▾
Show answer
Use a DriverManager with a ThreadLocal<WebDriver>, created in @BeforeMethod and removed in @AfterMethod. Page objects receive the driver through the constructor or get it from DriverManager.getDriver(). Constructor injection is cleaner and easier to test. Never store the driver in a static field shared by all threads, or parallel tests will control each other's browsers.
08

What is WebDriver and how does it communicate with the browser?

Save to ▾
Show answer
WebDriver sends commands over HTTP (W3C protocol) to a browser-specific driver such as chromedriver, which controls the actual browser.
09

JMeter runs out of memory during a large load test. What do you do?

Save to ▾
Show answer
First remove or disable GUI listeners like View Results Tree and run in non-GUI mode. Save results in CSV format with only needed fields instead of XML with response data. Increase heap through the HEAP environment variable, such as -Xms2g -Xmx4g, within the machine's RAM. Use Groovy instead of BeanShell, avoid huge regex extractions, and if one machine still cannot generate the load, distribute it across several workers.
10

What is the difference between getText() and getAttribute()?

Save to ▾
Show answer
getText returns visible inner text; getAttribute returns an HTML attribute or property such as value, href or class.
11

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

What is correlation in JMeter and why is it needed?

Save to ▾
Show answer
Correlation means capturing dynamic values from one response and passing them into later requests. Session ids, CSRF tokens, auth tokens and order ids change every run, so a recorded script with hard-coded values fails on replay. In JMeter you use post-processors such as JSON Extractor, Regular Expression Extractor or CSS Selector Extractor to save the value into a variable, then reference it as ${token} in later headers or bodies.
13

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

What is the difference between driver.close() and driver.quit()?

Save to ▾
Show answer
close() closes the current window; quit() closes all windows and ends the driver session.
15

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

You need 2,000 UI tests to run on every pull request in under 20 minutes. How would you design the infrastructure?

Save to ▾
Show answer
First shrink the UI suite by moving checks to API and unit level. Then run the rest on an autoscaling Grid, for example Kubernetes with KEDA, sized so tests divided by slots times average duration fits the budget. Make tests independent with API-based setup and ThreadLocal drivers. Shard tests across CI agents, fail fast on smoke tests first, and track flaky tests separately. Pin image versions and monitor queue time.
17

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

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

During a load test response times rise sharply. Which server-side metrics do you check?

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

Some scenarios are still being developed and must not run in CI yet. How do you handle them?

Save to ▾
Show answer
Tag them, for example with @wip, and exclude the tag in the CI runner using a tag expression like not @wip, set through the cucumber.filter.tags property or the runner options. Developers can still run them locally by including the tag. Review @wip scenarios regularly so they do not stay parked forever, and never use the tag to hide failing tests that should be fixed or reported as bugs.
21

What causes an AmbiguousStepDefinitionsException?

Save to ▾
Show answer
It occurs when one Gherkin step matches two or more step definitions, usually because of broad regular expressions or duplicate methods in different classes within the glue. Fix it by making expressions more specific, anchoring regexes with ^ and $, or removing the duplicate. Keeping step definitions organised by domain and reviewing new steps in pull requests prevents it.
22

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

How do you make page objects work with dynamic locators, such as a row containing a given name?

Save to ▾
Show answer
Write a method that builds the locator from a parameter, for example private By rowFor(String name) { return By.xpath("//tr[td[normalize-space()='" + name + "']]"); }, and expose actions like deleteUser(name). Keep the template in the page class, not in tests. Escape quotes if names may contain them, and prefer CSS with data attributes when the application provides them.
24

What is the Maven Surefire plugin and how do you configure it for TestNG?

Save to ▾
Show answer
Surefire runs tests during the test phase. For TestNG, configure suiteXmlFiles with the path to testng.xml, so mvn test runs that suite. You can pass system properties, set parallel and threadCount, and control reports. Make the suite file a property like ${suiteXml} so CI can choose smoke.xml or regression.xml with -DsuiteXml=smoke.xml.
25

What is the execution order of TestNG annotations?

Save to ▾
Show answer
@BeforeSuite → @BeforeTest → @BeforeClass → @BeforeMethod → @Test → @AfterMethod → @AfterClass → @AfterTest → @AfterSuite.
26

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

Mobile tests pass on the emulator but fail on a low-end real device. How do you investigate?

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

A login action can lead either to the dashboard or to an error message. How should the page object method return?

Save to ▾
Show answer
Make the outcome explicit with separate methods instead of one method guessing. For example loginAs(user) returns DashboardPage for valid credentials, while loginExpectingError(user) returns the same LoginPage so the test can check the error. Each method waits for its expected page and fails clearly if it does not appear. This keeps tests readable and avoids returning a generic Object or checking types in tests.
29

What are Java collections and which ones do testers use most?

Save to ▾
Show answer
ArrayList and LinkedList for lists, HashSet for unique values, HashMap for key-value test data, and Iterator for traversing them, for example collecting web elements in a list.
30

What is git cherry-pick?

Save to ▾
Show answer
git cherry-pick <commit> applies the changes of one specific commit onto your current branch, creating a new commit. It is useful when a fix on one branch, such as a locator fix on develop, is urgently needed on a release branch without merging everything else. Overuse creates duplicate commits and confusing history, so prefer normal merges when possible.
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 attach a screenshot to the Cucumber report when a scenario fails?

Save to ▾
Show answer
@After public void afterScenario(Scenario scenario) { if (scenario.isFailed()) { byte[] shot = ((TakesScreenshot) driver) .getScreenshotAs(OutputType.BYTES); scenario.attach(shot, "image/png", scenario.getName()); } driver.quit(); }
33

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

What is the difference between git merge and git rebase?

Save to ▾
Show answer
Merge combines branches by creating a merge commit, keeping the full history exactly as it happened. Rebase replays your commits on top of another branch, producing a straight, linear history without a merge commit. Rebase is good for tidying a local feature branch before a pull request; never rebase commits that others have already pulled, because it rewrites history.
35

Tests on the Grid fail with SessionNotCreatedException saying the new session request timed out. What do you check?

Save to ▾
Show answer
It means no matching free slot appeared in time. Check the Grid UI to see whether nodes are registered and whether their capabilities match the request, such as browser name, version or platform. Compare the test thread count with total slots, since extra threads just wait in the queue. Look for stuck sessions holding slots after aborted builds. Then increase capacity, reduce threads, or raise the session request timeout.
36

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.

Companies with offices in Thiruvananthapuram (3)

Few big employers listed in Thiruvananthapuram?

Many Thiruvananthapuram candidates also apply to teams in Bangalore and to remote or hybrid roles. Practise the Bangalore set as well.

Frequently asked questions

Which companies hire Automation Testing professionals in Thiruvananthapuram?

Companies with large offices in Thiruvananthapuram include UST, Tata Elxsi, Quest Global. Use their company pages below to practise employer-specific sets.

Are Automation Testing interviews in Thiruvananthapuram different from other cities?

The questions depend more on the company than the city. Thiruvananthapuram's mix of employers decides the style: Data and testing teams here often work with global clients in finance, travel and healthcare

How do I find Automation Testing jobs in Thiruvananthapuram?

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