Skip to content

IBM Automation Testing Interview Questions & Answers

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

About IBM hiring for Automation Testing roles

IBM is a global technology company offering hybrid cloud, AI through watsonx, software such as Red Hat, infrastructure and IBM Consulting services. Its India Software Labs and IBM Consulting teams form one of its largest workforces outside the US. It hires in India for software developers, test engineers, data engineers, data scientists and consultants.

For Automation Testing roles, this IBM practice set focuses most on TestNG Framework (8), Selenium WebDriver (5), Appium Mobile Automation (4), Git, Maven and Jenkins (4). It has 16 easy, 23 medium, 1 hard questions, so you can start easy and work up to the harder ones.

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

IBM Automation Testing interview process

  1. Online assessment (cognitive games + coding)
  2. English language test
  3. Technical interview
  4. Managerial or HR round

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

Solved for IBMStart 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 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.
03

What are Java 8 streams and lambdas?

Save to ▾
Show answer
Lambdas are short anonymous functions; streams process collections declaratively with filter, map and collect, for example filtering link text from a list of elements.
04

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

Tests pass on QA but fail in the staging pipeline. How do you investigate?

Save to ▾
Show answer
Compare what differs: configuration URLs, test data, feature flags, user permissions, network or proxy, browser versions and timing due to slower servers. Check logs and screenshots from staging and rerun one failing test with verbose logging. Often the issue is missing data or a flag. Fix by making environment settings explicit and creating required data in test setup.
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 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.
08

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

What is Appium Inspector and how do you use it?

Save to ▾
Show answer
Appium Inspector is a desktop or web tool that connects to an Appium server with your capabilities and shows a live screenshot of the app with its element tree. Clicking an element shows its attributes such as accessibility id, resource-id, text and bounds, and suggests locators. You can also try taps and swipes interactively. Testers use it to find stable locators and to check whether an element is really present before writing code.
10

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

How do you test an API that returns paginated results?

Save to ▾
Show answer
Call the first page, check page size, total count and the next link or cursor. Loop through pages until there is no next page, collecting IDs, then assert no duplicates and the total matches the reported count. Also test edge cases: page 0, a page beyond the last, invalid page size and sorting stability. Cap the loop to avoid endless runs if the API misbehaves.
12

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

What does a good commit message look like?

Save to ▾
Show answer
A short summary line under about 60 characters in the imperative mood, like "Add retry for flaky payment test", followed by a blank line and a body explaining why the change was made if not obvious. Reference the ticket ID. Small focused commits with clear messages make reviews faster and help when using git log or git bisect to find when a test broke.
14

What is a .gitignore file and what should an automation project ignore?

Save to ▾
Show answer
A .gitignore lists files Git should not track. In a Java automation project ignore target/, test-output/, allure-results/, reports, screenshots, logs, IDE folders like .idea and .vscode, *.iml, OS files like .DS_Store, and local config files holding secrets. Ignoring generated output keeps the repository small and avoids noisy diffs and conflicts.
15

How do you handle a browser basic authentication pop-up in Selenium?

Save to ▾
Show answer
The basic auth dialog is not part of the page, so findElement cannot reach it. The simplest way is putting credentials in the URL, like https://user:pass@site.test, which works in many browsers. In Selenium 4 with Chromium you can register credentials through the HasAuthentication interface: ((HasAuthentication) driver).register(UsernameAndPassword.of("user", "pass")). Keep the credentials in environment variables or a secret store, never in code.
16

Write a step definition that reads a DataTable as a list of maps.

Save to ▾
Show answer
// Given the following users exist @Given("the following users exist") public void usersExist(DataTable table) { List<Map<String, String>> rows = table.asMaps(); for (Map<String, String> row : rows) { userApi.create(row.get("name"), row.get("role")); } }
17

What does SE_NODE_MAX_SESSIONS control in the Docker Selenium images?

Save to ▾
Show answer
It sets how many browser sessions a node container can run at once. The default is one, which gives the best isolation and stability. Increasing it lets one container run several browsers in parallel, but you must also set SE_NODE_OVERRIDE_MAX_SESSIONS to true and give the container enough CPU, memory and shared memory. Many teams keep one session per container and scale the number of containers instead.
18

What is the difference between hard and soft assertions?

Save to ▾
Show answer
Hard assert stops the test at the first failure; SoftAssert collects failures and reports them together when assertAll() is called.
19

What locator strategy do you follow inside page objects?

Save to ▾
Show answer
Prefer stable attributes in this order: dedicated test attributes like data-testid, id, name, then short CSS selectors, and XPath only when text or complex relationships are needed. Avoid absolute XPaths and index-based locators. Keep locators as private final By fields at the top of the class with clear names, so updates are quick and readable.
20

How do you handle a test that is flaky only in headless mode?

Save to ▾
Show answer
Set window size explicitly, use proper waits, check animations and viewport differences, and capture screenshots and logs to find timing issues.
21

A test reading a properties file works in the IDE but fails in Jenkins with FileNotFoundException. Why?

Save to ▾
Show answer
The file path is probably hard-coded or relative to the IDE working directory, or uses Windows backslashes while Jenkins runs on Linux. Load the file from the classpath with getClass().getClassLoader().getResourceAsStream("config.properties") and keep it in src/test/resources, or build paths with Paths.get. Also check the file is committed to Git and not ignored.
22

An API returns 200 but your REST Assured assertion on a field fails with a null value. How do you debug it?

Save to ▾
Show answer
Log the full response with then().log().all() to see the actual body. Common causes are a wrong JSON path, such as missing a wrapper like data, the field being in an array needing an index, a different content type like XML or HTML error page, or the field name having different case. Fix the path, and add a schema check so structure changes are caught clearly.
23

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

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

Write a DataProvider that supplies two sets of login data and a test that uses it.

Save to ▾
Show answer
@DataProvider(name = "logins") public Object[][] logins() { return new Object[][] { {"asha", "Valid@1", true}, {"asha", "wrong", false} }; } @Test(dataProvider = "logins") public void login(String user, String pass, boolean ok) { boolean result = loginPage.loginAs(user, pass).isLoggedIn(); Assert.assertEquals(result, ok); }
26

What does alwaysRun = true do in TestNG?

Save to ▾
Show answer
On a configuration method like @AfterMethod(alwaysRun = true), it makes the method run even when tests fail or are skipped, or when groups filter would exclude it. It is essential for cleanup such as driver.quit(). On a test with dependsOnMethods, alwaysRun = true runs it even if the dependency failed. Missing alwaysRun on teardown is a common cause of leftover browsers in CI.
27

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

A TestNG test passes when run alone but fails when the full class runs. What do you check?

Save to ▾
Show answer
Look for shared state between methods: instance or static fields changed by earlier tests, data created or deleted by another test, cookies or logged-in session kept in the same browser, and priority or order assumptions. Run the class in a different order to confirm. Fix by resetting state in @BeforeMethod, creating unique data per test and avoiding static fields.
29

What is the difference between static and non-static members?

Save to ▾
Show answer
Static members belong to the class and are shared by all instances; non-static members belong to each object.
30

What is Selenium Grid and why use it?

Save to ▾
Show answer
It runs tests in parallel across multiple machines and browsers using a hub and nodes, cutting execution time and increasing browser coverage.
31

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
32

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

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
34

What is the difference between path params and query params in REST Assured?

Save to ▾
Show answer
Path params are part of the URL path and identify a resource, such as /users/{id}; you set them with pathParam("id", 5). Query params come after ? and filter or modify the result, such as /users?page=2; you set them with queryParam("page", 2). REST Assured URL-encodes both. Using named params instead of string concatenation makes tests cleaner and safer.
35

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

What is a webhook and how do you test it?

Save to ▾
Show answer
A callback where one system sends an HTTP request to another when an event occurs. Test with a mock receiver or tools such as webhook.site and verify the payload.
37

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

Write a declarative Jenkinsfile that runs Maven tests and publishes results.

Save to ▾
Show answer
pipeline { agent any parameters { choice(name: 'SUITE', choices: ['smoke', 'regression']) } stages { stage('Checkout') { steps { checkout scm } } stage('Test') { steps { sh "mvn clean test -DsuiteXml=${params.SUITE}.xml" } } } post { always { junit 'target/surefire-reports/*.xml' archiveArtifacts artifacts: 'target/screenshots/**', allowEmptyArchive: true } } }
39

What are Appium capabilities and which ones are essential to start a session?

Save to ▾
Show answer
Capabilities are key-value settings sent when creating a session that tell Appium what to automate. Essential ones are platformName, appium:automationName (UiAutomator2 or XCUITest), appium:deviceName or appium:udid, and either appium:app (path to the apk or ipa) or appPackage and appActivity for an installed Android app. In Appium 2 non-standard capabilities need the appium: prefix. In Java you usually set them through UiAutomator2Options or XCUITestOptions.
40

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.

Tips to crack the IBM Automation Testing interview

  • Practise IBM's game-based cognitive assessments, which test pattern recognition, memory and numerical reasoning quickly.
  • Learn basics of hybrid cloud, Red Hat OpenShift and watsonx, which IBM promotes as core strategic areas.
  • Revise SQL, Python or Java fundamentals and be ready to explain one project in depth.
  • 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; IBM interviewers usually ask follow-ups on your first answer.

Frequently asked questions

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

Candidates usually go through 4 stages: Online assessment (cognitive games + coding); English language test; Technical interview; Managerial or 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 IBM Automation Testing interview?

This practice set leans on TestNG Framework (8), Selenium WebDriver (5), Appium Mobile Automation (4), Git, Maven and Jenkins (4). Revise those first, then practise explaining one or two of your own projects end to end, because most IBM interviewers ask you to walk through real work.

Are these the exact questions asked at IBM?

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

Where does IBM hire Automation Testing professionals in India?

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

Automation Testing questions for similar companies