Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Siemens hiring for Automation Testing roles
Siemens is a German technology company working in industrial automation, digital industries software, smart infrastructure, mobility and healthcare through Siemens Healthineers. Its India entities include engineering and technology centres in Bengaluru and Pune. It hires for software engineers, test engineers, data analysts and engineers working on industrial software and IoT.
For Automation Testing roles, this Siemens practice set focuses most on Selenium WebDriver (9), Selenium Grid & Docker (5), Core Java for Testers (5), Page Object Model (4). It has 7 easy, 30 medium, 3 hard questions, so you can start easy and work up to the harder ones.
Company type
Hardware & semiconductors
Headquarters
Munich, Germany
Main India offices
Mumbai, Bengaluru, Pune
Siemens Automation Testing interview process
Online assessment (aptitude + technical)
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 SiemensStart 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 attach a screenshot to the Cucumber report when a scenario fails?
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.
Re-locate the element after the DOM refreshes, use explicit waits for the refreshed element, don't keep element references for long, or wrap the action in retry logic.
08
Your Selenium tests in CI produce blank screenshots in headless mode. What could be wrong?
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.
Implicit wait applies globally to element lookups. Explicit wait waits for a specific condition (WebDriverWait + ExpectedConditions). Fluent wait is an explicit wait with custom polling and ignored exceptions.
10
What is ITestContext in TestNG and how can you use it to share data?
ITestContext represents one test tag from testng.xml and is passed to listeners and configuration methods. It holds the suite, included methods and results, and has setAttribute and getAttribute to share values, such as an auth token created in @BeforeTest and read by later classes. Because it is shared by every thread in that test tag, store only thread-safe or read-only data there, not WebDriver instances during parallel runs.
11
ArrayList vs HashMap — how do you use them in a framework?
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.
Optional is a container that may or may not hold a value, introduced in Java 8 to avoid returning null. In test code it suits lookups that can legitimately find nothing, such as finding a row in a table or reading an optional config key. Callers use orElse, orElseThrow or ifPresent instead of null checks. For example, findRowByName(name).orElseThrow(() -> new AssertionError(name + " not found")) gives a clear failure message.
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.
17
What is the difference between an array and an ArrayList?
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.
20
How do you avoid page object classes becoming too large?
Split pages into components for repeated or complex areas, keep only user actions as public methods, move generic helpers to BasePage or utilities, and avoid one method per element. If a page has distinct modes like view and edit, use separate classes. Review page classes during code review and refactor when they cross a few hundred lines.
21
Tests running inside Docker cannot reach the application running on the host's localhost. Why, and how do you fix it?
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.
22
How do you store passwords and tokens safely in Jenkins?
Use the Jenkins Credentials store and bind them in the pipeline with withCredentials or the credentials() helper in environment blocks. Jenkins masks the values in console logs. Never hard-code secrets in the Jenkinsfile, pom.xml or properties files committed to Git. For larger setups, integrate a vault service and give each job only the credentials it needs.
23
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.
Give each page an isAt() or waitUntilLoaded() method that waits for a unique element, page title or URL fragment. Call it in the constructor or right after navigation. If it fails, throw a clear error such as "Expected Cart page but URL was /login". This catches navigation problems at the right point instead of failing later with a confusing locator error.
29
How do you test an API that returns paginated results?
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.
30
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.
Parameterization replaces hard-coded inputs with varied test data so users do not all log in as the same account or search the same item, which would give unrealistic cache hits. CSV Data Set Config reads a CSV file line by line and stores columns into variables like ${username} and ${password}. You set the file path, variable names, delimiter, whether to recycle at end of file and the sharing mode across threads.
33
Write a declarative Jenkinsfile that runs Maven tests and publishes results.
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.
36
How do you extract an auth token with JSON Extractor and use it in later JMeter requests?
Add a JSON Extractor as a child of the login sampler. Set the variable name to token, the JSON path expression to $.access_token, match number 1 and a default like TOKEN_NOT_FOUND so failures are visible. Then add an HTTP Header Manager at Thread Group level with Authorization set to Bearer ${token}. Each thread extracts and uses its own token, because JMeter variables are per thread.
37
Tell me about a time you mentored a junior tester in Java and automation.
Situation: two new joiners from manual testing struggled with framework code. Task: help them contribute within a sprint. Action: I paired with them daily for an hour, gave small tasks like adding a locator then a full test, and reviewed their code with explanations rather than rewriting it. Result: within three weeks both were writing tests independently, and our automation backlog shrank.
Add the rerun plugin, for example rerun:target/failed.txt, to the main runner. It writes the location of each failed scenario. Create a second runner whose features point to @target/failed.txt and run it after the main run in Maven or Jenkins. Use reruns to separate real failures from flaky ones, but track flaky scenarios and fix them instead of hiding them.
39
What is the difference between the normal, eager and none page load strategies in Selenium?
Page load strategy decides when navigation commands like get() return. Normal, the default, waits for the full load event including images and stylesheets. Eager returns when the DOM is ready (DOMContentLoaded), which speeds up heavy pages. None returns immediately after the initial response. With eager or none you must rely on explicit waits for the elements you need. Set it through options.setPageLoadStrategy(PageLoadStrategy.EAGER).
40
Write a Dockerfile that runs a Maven and TestNG test suite.
FROM maven:3.9-eclipse-temurin-21
WORKDIR /app
# cache dependencies first for faster rebuilds
COPY pom.xml .
RUN mvn -q dependency:go-offline
COPY src ./src
COPY testng.xml .
ENV GRID_URL=http://selenium-hub:4444
CMD ["sh", "-c", "mvn test -Dgrid.url=$GRID_URL -Dsurefire.suiteXmlFiles=testng.xml"]
Tips to crack the Siemens Automation Testing interview
Learn basics of industrial automation, PLCs and IoT, which connect to many Siemens software and testing roles.
Read about Siemens Xcelerator and digital twin concepts used in its industrial software.
Revise C++, Java or Python and testing fundamentals depending on the team you are applying to.
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; Siemens interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Siemens Automation Testing interview?
Candidates usually go through 5 stages: Online assessment (aptitude + technical); 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 Siemens Automation Testing interview?
This practice set leans on Selenium WebDriver (9), Selenium Grid & Docker (5), Core Java for Testers (5), Page Object Model (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Siemens interviewers ask you to walk through real work.
Are these the exact questions asked at Siemens?
No. These are curated practice questions that match the skills and difficulty usually tested in hardware & semiconductors interviews like Siemens's. They are not a leaked or verified list of past questions.
Where does Siemens hire Automation Testing professionals in India?
Siemens has large teams in Mumbai, Bengaluru, Pune. Openings and locations change often, so check the Siemens careers page and filter by city and experience.
Automation Testing questions for similar companies