SAP Automation Testing Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About SAP hiring for Automation Testing roles
SAP is a German enterprise software company known for ERP systems like SAP S/4HANA, along with analytics, cloud and business AI products. SAP Labs India in Bengaluru and Gurugram is one of its largest development centres. It hires for software developers, quality engineers, data engineers and analytics roles.
For Automation Testing roles, this SAP practice set focuses most on Core Java for Testers (7), Selenium Grid & Docker (5), REST Assured (5), API Testing and CI/CD (5). It has 1 easy, 25 medium, 14 hard questions, so you can start easy and work up to the harder ones.
Company type
Product
Headquarters
Walldorf, Germany
Main India offices
Bengaluru, Gurugram, Pune, Mumbai
SAP Automation Testing interview process
Online assessment (aptitude + coding)
Technical round 1
Technical round 2
Managerial round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for SAPStart 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?
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
After aborted Jenkins builds, Grid slots stay busy and new tests wait. How do you handle it?
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.
03
Why do Selenium browser containers need a larger shm_size?
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.
First clarify what 10,000 users means: concurrent sessions, users per hour or requests per second, and which journeys they perform. Use production analytics to build the workload mix and think times, then agree on SLAs like 95th percentile under two seconds and errors under one percent. Prepare a production-like environment and data, plan baseline, load, stress and soak runs, set up monitoring, and share a report with clear limits and bottlenecks.
06
How would you design an automation framework from scratch?
Continuous Integration builds and tests every commit, and Continuous Delivery ships automatically. Automated tests give fast feedback and gate releases.
09
You need 2,000 UI tests to run on every pull request in under 20 minutes. How would you design the infrastructure?
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.
// REST Assured uses GPath for XML as well as JSON
given()
.accept(ContentType.XML)
.when()
.get("/orders/42")
.then()
.statusCode(200)
.contentType(ContentType.XML)
.body("order.@id", equalTo("42"))
.body("order.items.item.size()", equalTo(3))
.body("order.status", equalTo("SHIPPED"));
12
How would you automate a login flow with multiple user roles?
On Android use the mobile: deepLink command with the URL and package, for example driver.executeScript("mobile: deepLink", Map.of("url", "shop://product/42", "package", "com.example.shop")). On iOS simulators driver.get with the custom URL opens it, though Safari may show a confirm dialog to handle. Then assert that the correct screen and data are shown. Deep links are also a great shortcut to reach deep screens quickly in other tests.
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.
16
Should page objects use inheritance or composition?
Use a shallow inheritance only for a BasePage with common helpers. For shared UI parts, use composition: a page has a Header, a SideMenu and a Table component. Deep inheritance like BasePage to ListPage to ProductListPage to SaleProductListPage becomes fragile and hard to debug. Composition mirrors how modern UIs are built from components and keeps classes small.
17
How do you handle a test that is flaky only in headless mode?
Read the documented limit, then send requests quickly until you exceed it and assert a 429 Too Many Requests response with headers like Retry-After or remaining quota. Wait for the window to reset and confirm requests succeed again. Also check limits are per user or key as designed. Run these tests in isolation so they do not throttle the rest of the suite.
Grid 4 is split into the Router, which receives all requests, the Distributor, which assigns new sessions to nodes, the Session Map, which records which node owns each session, the New Session Queue, which holds requests waiting for a free slot, the Event Bus, which lets components communicate, and Nodes, which run the browsers. In standalone or hub mode these run in one process, but they can also be deployed separately to scale.
Use TestNG parallel="methods | classes | tests" with thread-count, keep WebDriver in a ThreadLocal, and use Selenium Grid or a cloud grid for multiple browsers.
Use a parallel block in the pipeline with a stage per browser, or a matrix directive with axis BROWSER values chrome, firefox and edge. Each branch runs mvn test -Dbrowser=${BROWSER}, ideally against Selenium Grid or containers so agents do not need local browsers. Publish results per branch with clear names so failures show which browser broke.
@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.
28
Tell me about a time you set up test infrastructure that other teams started using.
Situation: three product teams each kept their own unstable Grid VMs. Task: provide one reliable shared Grid. Action: I set up a Docker-based Grid with pinned images, health checks, video for failures and a short onboarding guide, then ran a pilot with one team and fixed their issues before opening it up. Result: all three teams moved within a quarter, VM costs dropped and Grid-related failures fell sharply.
29
What is polymorphism and how does it show up in Selenium?
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.
32
Write a REST Assured test that deserializes a response into a POJO.
Situation: before each regression a tester spent an hour deploying the build to QA and seeding data by hand. Task: remove that manual step. Action: I wrote a Jenkins pipeline stage that deployed the build, ran database seed scripts and a smoke check, then triggered the regression job, and documented it for the team. Result: setup dropped to ten minutes without human effort, and regressions could run overnight automatically.
Screenplay models tests around actors who have abilities (browse the web, call an API), perform tasks (place an order) made of interactions, and ask questions to verify state. It scales better for large suites because tasks are small, composable classes, whereas page objects can grow huge. It has a steeper learning curve, so POM with components is enough for most teams.
36
What is consumer-driven contract testing with Pact?
In consumer-driven contracts, the consumer's tests record the requests it makes and the responses it expects into a pact file. The provider runs a verification against that pact to prove it still meets every consumer's needs. A Pact Broker stores contracts and can block deployments that break a consumer. It catches integration breaks without needing all services deployed together.
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.
39
Write Appium Java code to perform a vertical swipe using W3C Actions.
One controller machine coordinates several worker machines that generate the load. On each worker start jmeter-server with the same JMeter and Java versions, place CSV files locally and open the RMI ports in the firewall. On the controller list the workers in remote_hosts in jmeter.properties, or pass -R host1,host2, and run in non-GUI mode with -r or -R. Remember that thread counts multiply per worker, so 100 threads on 4 workers gives 400 users.
Tips to crack the SAP Automation Testing interview
Learn basic ERP concepts and what SAP S/4HANA, SAP BTP and SAP Analytics Cloud are used for.
Revise DSA, OOP and DBMS fundamentals, as SAP Labs technical interviews commonly test these core computer science topics.
Read about SAP's move to cloud and business AI, which shapes many current product roles.
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; SAP interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the SAP Automation Testing interview?
Candidates usually go through 5 stages: Online assessment (aptitude + coding); Technical round 1; Technical round 2; 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 SAP Automation Testing interview?
This practice set leans on Core Java for Testers (7), Selenium Grid & Docker (5), REST Assured (5), API Testing and CI/CD (5). Revise those first, then practise explaining one or two of your own projects end to end, because most SAP interviewers ask you to walk through real work.
Are these the exact questions asked at SAP?
No. These are curated practice questions that match the skills and difficulty usually tested in product interviews like SAP's. They are not a leaked or verified list of past questions.
Where does SAP hire Automation Testing professionals in India?
SAP has large teams in Bengaluru, Gurugram, Pune, Mumbai. Openings and locations change often, so check the SAP careers page and filter by city and experience.
Automation Testing questions for similar companies