Skip to content

Automation Testing Interview Questions in Lucknow

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

Automation Testing jobs in Lucknow

Lucknow's tech job market is smaller but growing, led by IT-services delivery centres, government-tech projects and start-ups. Many Lucknow candidates target Noida and Gurgaon roles or remote jobs, so interviews follow the NCR pattern.

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

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

The on-screen keyboard hides the login button in your mobile test. What do you do?

Save to ▾
Show answer
Call driver.hideKeyboard() after typing, or check driver.isKeyboardShown() first so the call does not fail when no keyboard is open. On Android you can also set appium:hideKeyboard or use a capability for the unicode keyboard so the soft keyboard does not appear. Alternatively press the keyboard's Done or Enter key, or scroll the button into view. Pick one approach and put it in a helper so all tests behave the same.
02

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

How do you increase the number of Chrome nodes with Docker Compose?

Save to ▾
Show answer
Use the scale option: docker compose up -d --scale chrome=4 starts four Chrome node containers from the same service definition, and each registers with the hub. Do not fix container names or host ports on a scaled service, or the extra containers will clash. Check the Grid UI on port 4444 to confirm the slots. Make sure the host has enough CPU and memory, roughly one CPU core and 1 to 2 GB per browser.
04

What is the difference between throw and throws?

Save to ▾
Show answer
throw actually raises an exception object inside a method; throws declares in the method signature that it may pass an exception to the caller.
05

What is the Page Object Model?

Save to ▾
Show answer
A design pattern where each page is a class holding its locators and actions, so tests stay readable and a locator change is fixed in one place.
06

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

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

How would you design a framework that supports both web and mobile using POM?

Save to ▾
Show answer
Define page interfaces for business actions, such as LoginScreen.loginAs(). Provide web and mobile implementations using Selenium and Appium, chosen by a factory from configuration. Tests depend only on the interfaces. Share test data, config, reporting and API helpers. Accept that some flows differ by platform and keep those in platform-specific tests rather than forcing one abstraction.
09

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

What is the difference between parallel="methods", "classes" and "tests" in testng.xml?

Save to ▾
Show answer
methods runs each @Test method in its own thread, giving the most parallelism but requiring fully independent tests and thread-safe drivers. classes runs all methods of one class in the same thread, with different classes in parallel. tests runs each <test> tag in parallel, often used to run different browsers. instances is also available for factory instances. thread-count sets the pool size.
11

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

Your API tests started failing with SSL handshake errors on a new test server. What do you do?

Save to ▾
Show answer
First confirm the server uses a self-signed or internal certificate. The proper fix is to import the company CA certificate into a truststore and configure REST Assured with trustStore(path, password). As a temporary measure in a test environment only, relaxedHTTPSValidation() skips checks. Never use relaxed validation against production, and raise the certificate issue with the infra team.
13

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

Tell me about a time a CI pipeline you owned broke right before a release.

Save to ▾
Show answer
Situation: the night before release, every UI test failed in Jenkins. Task: find the cause fast and unblock the release. Action: I checked the console and saw a browser and driver version mismatch after an agent update, pinned the browser image version, reran the suite and shared a short note. Result: the release went out on time and we added image version pinning to the pipeline.
15

Should assertions be written inside page objects?

Save to ▾
Show answer
Generally no. Page objects should expose state and actions, such as getErrorMessage() or isLoggedIn(), and tests should make the assertions. This keeps page classes reusable across positive and negative tests and keeps the test intent visible. A small exception is a simple check that the correct page has loaded, often done in the constructor or an isAt() method.
16

What is the difference between Comparable and Comparator in Java?

Save to ▾
Show answer
Comparable defines the natural order inside the class (compareTo); Comparator defines custom orders externally (compare), useful for sorting test data in several ways.
17

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

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

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
20

How does the DataProvider annotation work?

Save to ▾
Show answer
A method annotated with @DataProvider returns a 2D object array and the test with dataProvider = "name" runs once per row.
21

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

What is a Jenkins pipeline?

Save to ▾
Show answer
A scripted or declarative Jenkinsfile that defines stages such as build, test and deploy as code stored with the project.
23

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

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

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

What is the Rule keyword in Gherkin?

Save to ▾
Show answer
Rule, added in Gherkin 6, groups scenarios that illustrate one business rule inside a feature. For example, a Feature: Discounts can have Rule: Orders above 1000 get free delivery, followed by scenarios showing the rule holding and not holding. Each Rule can have its own Background. It makes feature files read like a specification of rules with examples, which helps business stakeholders see exactly what each scenario proves.
27

How do you pass thread count and duration to a JMeter test from the command line?

Save to ▾
Show answer
// In the Thread Group fields use property functions with defaults Number of Threads: ${__P(users,10)} Ramp-up period: ${__P(rampup,30)} Duration (seconds): ${__P(duration,300)} // Then override them when running jmeter -n -t load.jmx -l out.jtl -Jusers=200 -Jrampup=120 -Jduration=1800
28

What is git stash and when would you use it?

Save to ▾
Show answer
git stash saves uncommitted changes and cleans the working directory so you can switch branches. Later, git stash pop reapplies them. Use it when you are halfway through a change and must quickly fix something on another branch. git stash list shows saved stashes, and git stash push -m "msg" names them. For longer work, a temporary commit on a branch is clearer.
29

You join a project where tests call driver.findElement directly everywhere. How do you move to POM?

Save to ▾
Show answer
I would not rewrite everything at once. First create the base structure: DriverManager, BasePage and config. Then pick the most-used flows, such as login and navigation, create page objects for them and migrate tests touching those pages. Agree that new tests must use POM, and migrate old tests when they are next changed. Track progress so the team sees improvement in maintenance time.
30

What is CI/CD and why does automation need it?

Save to ▾
Show answer
Continuous Integration builds and tests every commit, and Continuous Delivery ships automatically. Automated tests give fast feedback and gate releases.
31

A developer changed the UI and 40 tests failed with NoSuchElementException. How does POM help here?

Save to ▾
Show answer
Because locators live only in page classes, I check which page object methods fail, update the changed locators in those few classes, and rerun. Usually 40 failures map to two or three locators. I would also ask developers to add stable data-testid attributes and review UI changes with QA early, so future changes do not break tests unexpectedly.
32

What changed in Appium 2 compared with Appium 1?

Save to ▾
Show answer
Appium 2 split the monolithic server into a core plus separately installed drivers and plugins, managed with appium driver install and appium plugin install. It dropped the old JSON Wire Protocol in favour of W3C WebDriver only, so vendor capabilities need the appium: prefix. The default base path changed from /wd/hub to /. Old TouchAction and MultiTouchAction were removed from the Java client, so gestures use W3C Actions or mobile: commands.
33

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

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

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

How do you get reports, screenshots and downloaded files out of a Docker container?

Save to ▾
Show answer
Use volumes. A bind mount maps a host folder into the container, for example -v $(pwd)/target:/app/target, so reports written in the container appear on the CI agent for archiving. Named volumes are managed by Docker and suit data that should survive restarts. For browser downloads, mount the node's download folder or enable the Grid's managed downloads with the se:downloadsEnabled capability to fetch files through the Grid API.

Companies with offices in Lucknow (1)

Few big employers listed in Lucknow?

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

Frequently asked questions

Which companies hire Automation Testing professionals in Lucknow?

Companies with large offices in Lucknow include HCLTech. Use their company pages below to practise employer-specific sets.

Are Automation Testing interviews in Lucknow different from other cities?

The questions depend more on the company than the city. Lucknow's mix of employers decides the style: Many Lucknow candidates target Noida and Gurgaon roles or remote jobs, so interviews follow the NCR pattern

How do I find Automation Testing jobs in Lucknow?

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