Skip to content

American Express Automation Testing Interview Questions & Answers

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

About American Express hiring for Automation Testing roles

American Express is a global payments and card company offering charge and credit cards, travel services and merchant acquiring. Its India centres in Gurugram and Bengaluru support technology, risk, analytics and servicing. It hires for software engineers, QA engineers, data analysts, data scientists and credit risk analysts.

For Automation Testing roles, this American Express practice set focuses most on Appium Mobile Automation (6), Core Java for Testers (6), REST Assured (5), Selenium WebDriver (4). It has 10 easy, 28 medium, 2 hard questions, so you can start easy and work up to the harder ones.

Company type
Banking & finance
Headquarters
New York, USA
Main India offices
Gurugram, Bengaluru

American Express Automation Testing interview process

  1. Online assessment (aptitude + coding or analytics)
  2. Technical round
  3. Case or domain round
  4. Hiring manager round
  5. HR round

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

Solved for American ExpressStart 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

Write a REST Assured POST test that sends a JSON body and checks the response.

Save to ▾
Show answer
@Test public void createUser() { String body = "{\"name\":\"Ravi\",\"job\":\"QA\"}"; given() .baseUri("https://api.example.com") .contentType(ContentType.JSON) .body(body) .when() .post("/users") .then() .statusCode(201) .body("name", equalTo("Ravi")) .body("id", notNullValue()); }
02

How do you mock an external API in automation tests?

Save to ▾
Show answer
Use a tool such as WireMock or MockServer to run a stub server that returns predefined responses for given requests. Point the application or tests to the stub with configuration. This lets you test error codes, timeouts and edge cases that are hard to trigger on the real service, and keeps tests stable when the third party is down. Still keep a few tests against the real integration.
03

How do you log requests and responses in REST Assured?

Save to ▾
Show answer
Use given().log().all() for the full request and then().log().all() for the full response. To reduce noise, use log().ifValidationFails() on both, which prints only when a test fails. For a whole suite, set RestAssured.enableLoggingOfRequestAndResponseIfValidationFails() or add RequestLoggingFilter and ResponseLoggingFilter in a shared spec. Mask tokens and passwords before logs reach CI.
04

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

What is the Background keyword and when should you avoid it?

Save to ▾
Show answer
Background holds steps that run before every scenario in a feature file, such as opening the app and logging in. It removes repetition in Given steps. Avoid it when it becomes long, when only some scenarios need it, or when it hides important context, because readers then cannot understand a scenario on its own. In that case use a hook or a clearer Given step.
06

Your recorded JMeter script fails with 403 on every request after login. What is the likely cause?

Save to ▾
Show answer
The script is probably replaying hard-coded dynamic values, such as a CSRF token, session cookie or auth header captured during recording. The server rejects them because they belong to the old session. Add an HTTP Cookie Manager so cookies are handled per thread, extract the CSRF or bearer token from the login response with an extractor, and replace the recorded value with the variable. Verify with View Results Tree on one thread.
07

How would you design one mobile framework that serves both Android and iOS?

Save to ▾
Show answer
Keep tests platform-neutral and push differences into page objects. Use Appium's @AndroidFindBy and @iOSXCUITFindBy annotations, or separate locator files per platform, behind one screen class. Create the driver through a factory that reads platform from configuration. Ask developers to add the same accessibility ids on both platforms so most locators are shared. Put gestures and waits in a common base screen, and tag tests that apply to only one platform.
08

What are relative locators in Selenium 4?

Save to ▾
Show answer
Locators such as above, below, toLeftOf and near that find elements by their position relative to another element.
09

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

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

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

What is the difference between @Test(priority) and dependsOnMethods in TestNG?

Save to ▾
Show answer
priority only orders tests; a lower number runs first, and a failed test does not stop the others. dependsOnMethods creates a real dependency: if the parent test fails, dependent tests are skipped. Both make tests order-dependent, which hurts parallel runs and isolation, so use them sparingly. Prefer independent tests with their own setup.
13

What is serialization and deserialization in REST Assured?

Save to ▾
Show answer
Serialization converts a Java object (POJO) into JSON for the request body; deserialization converts the response JSON back into a Java object. REST Assured does this automatically when Jackson or Gson is on the classpath: body(userPojo) serializes and response.as(User.class) deserializes. Using POJOs gives type safety, IDE support and cleaner assertions compared with hand-written JSON strings.
14

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

How do you record videos of tests running on a Docker Selenium Grid?

Save to ▾
Show answer
Add the selenium/video image as a sidecar container next to each node, sharing the node's display through DISPLAY_CONTAINER_NAME, and mount a folder for the mp4 files. Newer Grid versions also support recording per session by setting the se:recordVideo capability with Dynamic Grid. Name videos with se:name so they match test names. Keep videos only for failed tests or for a few days, because they use a lot of disk space.
16

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

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

What is the LoadableComponent pattern in Selenium?

Save to ▾
Show answer
LoadableComponent is a Selenium support class that standardises how a page object ensures it is loaded. You extend it and implement load(), which navigates to the page, and isLoaded(), which throws an Error if the page is not ready. Calling get() checks isLoaded and calls load only if needed, then checks again. It gives a consistent, self-verifying way to open pages and fails fast with a clear message.
19

A runtime permission pop-up appears on first launch and breaks your Android tests. How do you handle it?

Save to ▾
Show answer
The cleanest fix is the capability appium:autoGrantPermissions set to true, which grants all permissions the app declares at install time. If you need to test the permission flow itself, handle the dialog explicitly by waiting for the Allow button using its resource-id and clicking it. Another option is granting a specific permission with adb shell pm grant before the test. Avoid blind try-catch around taps, because it hides real failures.
20

What is the use of Maven in automation projects?

Save to ▾
Show answer
It manages dependencies through pom.xml, builds the project, runs tests with Surefire and standardises structure across teams.
21

What is the difference between native, hybrid and mobile web apps from a testing point of view?

Save to ▾
Show answer
A native app is built with platform SDKs and is tested through native locators like accessibility id or resource-id. A mobile web app runs in the device browser, so you automate it much like desktop Selenium with mobile Chrome or Safari. A hybrid app wraps web content inside a native shell, so tests switch between the NATIVE_APP context and a WEBVIEW context. Knowing the type decides your driver, locators and setup.
22

What is the Maven Failsafe plugin and how is it different from Surefire?

Save to ▾
Show answer
Surefire runs unit tests in the test phase and stops the build as soon as tests fail. Failsafe runs integration tests in the integration-test phase and checks results later in the verify phase, so post-integration-test steps, like stopping a server or Docker containers, still run after failures. By default Failsafe picks classes named *IT. Many teams run UI and API suites through Failsafe with mvn verify for that reason.
23

What is the difference between noReset and fullReset in Appium?

Save to ▾
Show answer
By default Appium clears app data between sessions but keeps the app installed. noReset set to true keeps app data and login state, which speeds up tests but can leak state between them. fullReset set to true uninstalls and reinstalls the app, giving the cleanest state but adding time. A common approach is noReset for fast suites with explicit cleanup in the test, and fullReset only for first-launch or onboarding scenarios.
24

Parallel TestNG runs open browsers that interact with each other's tests. How do you fix it?

Save to ▾
Show answer
The WebDriver is shared, probably through a static field. Replace it with a ThreadLocal<WebDriver> in a DriverManager, create the driver in @BeforeMethod and call quit() and remove() in @AfterMethod(alwaysRun = true). Make page objects take the driver from the current thread. Also check test data, reports and loggers are thread-safe.
25

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

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

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

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");
29

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

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; }
31

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

How do you group tests?

Save to ▾
Show answer
Tag tests with groups = {"smoke","regression"} and include or exclude them in testng.xml to run chosen sets.
33

What is PageFactory?

Save to ▾
Show answer
A helper that initialises @FindBy elements lazily using initElements; some teams skip it in favour of plain By locators.
34

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
35

How do you extract a value from one response and use it in the next request?

Save to ▾
Show answer
String token = given().body(creds).when().post("/login") .then().statusCode(200) .extract().path("token"); given() .header("Authorization", "Bearer " + token) .when() .get("/orders") .then() .statusCode(200);
36

Write a REST Assured test using RequestSpecBuilder and ResponseSpecBuilder.

Save to ▾
Show answer
RequestSpecification req = new RequestSpecBuilder() .setBaseUri(Config.baseUrl()) .setContentType(ContentType.JSON) .addHeader("Authorization", "Bearer " + token) .build(); ResponseSpecification ok = new ResponseSpecBuilder() .expectStatusCode(200) .expectContentType(ContentType.JSON) .build(); given().spec(req).when().get("/orders").then().spec(ok);
37

You see ConcurrentModificationException in your test utility. What causes it and how do you fix it?

Save to ▾
Show answer
It occurs when a collection is modified while being iterated with a for-each loop, for example removing items from an ArrayList inside the loop. Fix by using Iterator.remove(), removeIf(), collecting items to remove separately, or using CopyOnWriteArrayList or ConcurrentHashMap when threads share the collection. In parallel tests, shared lists are a common source.
38

Your framework throws NullPointerException in a page object on the first action. What are the likely causes?

Save to ▾
Show answer
The driver was never initialised or was passed as null, for example a page created before setup ran or a static driver not yet assigned. With PageFactory, initElements may not have been called, so @FindBy fields are null. A config value read from a properties file may also be missing. Check the stack trace line, then fix the setup order and add null checks with clear messages.
39

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

Tell me about a time a BDD conversation clarified a requirement before development started.

Save to ▾
Show answer
Situation: a story said users get a refund if an order is cancelled early. Task: write scenarios with the product owner and developer. Action: while writing examples I asked what early meant and whether shipped orders counted. The three of us found the story had no time limit and no rule for partial shipments, and we wrote four concrete scenarios. Result: the rules were fixed before coding, avoiding a rework that had happened in a previous sprint.

Tips to crack the American Express Automation Testing interview

  • Learn credit card business basics like spend, revolve, delinquency and customer lifetime value for analytics interviews.
  • Practise SQL, Python and statistics, including model evaluation for risk or marketing use cases.
  • Read about American Express's Blue Box values and its strong focus on customer service.
  • 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; American Express interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the American Express Automation Testing interview?

Candidates usually go through 5 stages: Online assessment (aptitude + coding or analytics); Technical round; Case or domain round; Hiring manager 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 American Express Automation Testing interview?

This practice set leans on Appium Mobile Automation (6), Core Java for Testers (6), REST Assured (5), Selenium WebDriver (4). Revise those first, then practise explaining one or two of your own projects end to end, because most American Express interviewers ask you to walk through real work.

Are these the exact questions asked at American Express?

No. These are curated practice questions that match the skills and difficulty usually tested in banking & finance interviews like American Express's. They are not a leaked or verified list of past questions.

Where does American Express hire Automation Testing professionals in India?

American Express has large teams in Gurugram, Bengaluru. Openings and locations change often, so check the American Express careers page and filter by city and experience.

Automation Testing questions for similar companies