Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About KPMG hiring for Automation Testing roles
KPMG is one of the Big Four professional services networks, providing audit, tax and advisory services. KPMG in India and its global delivery centres support clients with technology consulting, data and analytics, risk advisory and cybersecurity. It hires in India for analysts and consultants in data analytics, governance and risk, IT audit, testing and ERP implementation.
For Automation Testing roles, this KPMG practice set focuses most on Core Java for Testers (6), Selenium WebDriver (5), REST Assured (5), TestNG Framework (5). It has 4 easy, 29 medium, 7 hard questions, so you can start easy and work up to the harder ones.
Company type
Consulting
Headquarters
Amstelveen, Netherlands
Main India offices
Gurugram, Bengaluru, Mumbai, Hyderabad, Pune
KPMG Automation Testing interview process
Online assessment or screening test
Technical interview
Managerial or case round
Partner or HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for KPMGStart 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.
sendKeys with a file path sends a path that exists on your test machine, but the browser runs on the remote node where that path does not exist. Set a LocalFileDetector on the RemoteWebDriver, using ((RemoteWebDriver) driver).setFileDetector(new LocalFileDetector()), so Selenium zips and transfers the file to the node first. Alternatively mount the test data folder into the node container. Always use absolute paths.
03
Should every test in a project be written in Cucumber?
No. Cucumber adds a translation layer, so it is worth it for business-facing acceptance tests that stakeholders discuss. Unit tests, low-level API checks, data validations and technical edge cases are faster to write and maintain directly in TestNG or JUnit. A healthy project uses Cucumber for a focused set of key behaviours and plain code tests for everything else.
04
Tell me about a time you had to explain a technical test failure to a non-technical manager.
Situation: a release was blocked by failing tests and the manager wanted to know if it was safe to ship. Task: explain the risk without jargon. Action: I separated the failures into one real bug, where customers could be charged twice, and three environment issues. I showed the bug with a short screen recording. Result: the manager delayed the release by one day, the bug was fixed and the environment issues were assigned to DevOps.
Put explicit waits in page methods or BasePage helpers, not in tests. For example click() waits for elementToBeClickable before clicking, and a page's isLoaded() waits for a key element. Avoid Thread.sleep and avoid mixing implicit and explicit waits. Keep the timeout configurable so CI can use a slightly longer value than local runs.
07
Your API token expires after 15 minutes and long REST Assured suites start failing with 401. What do you do?
Centralise token handling in an auth helper that caches the token with its expiry time and refreshes it shortly before it expires, or in a filter that catches a 401, refreshes once and retries. Do not log in before every test, as that slows the suite and may hit rate limits. Make the helper thread-safe for parallel runs.
08
What is the difference between static and non-static members?
Situation: a developer said a rounding difference in invoice totals was expected. Task: resolve it without friction. Action: I checked the requirement, found it specified rounding per line, and brought the document and a test case with expected values to a quick call with the BA. Result: the BA confirmed it was a bug, it was fixed, and we added the rule to the acceptance criteria.
10
How do you share state between step definition classes in Cucumber Java?
Use dependency injection. With cucumber-picocontainer (or Spring/Guice), create a context class such as TestContext holding the driver, page objects and scenario data, and add it as a constructor parameter in every step class. Cucumber creates one instance per scenario and injects the same object everywhere, so state is shared within a scenario but never leaks between scenarios. Avoid static fields because they break parallel runs.
11
Tell me about a time a flaky test cost your team time and how you fixed it permanently.
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.
12
Write a REST Assured PUT test that updates a resource using a POJO.
@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.
14
How do you increase the number of Chrome nodes with Docker Compose?
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.
15
Describe a time you improved the maintainability of an automation framework.
Situation: our suite had duplicated locators across 200 tests and each UI release broke many of them. Task: reduce maintenance effort. Action: I introduced page objects and components for the top ten pages, added data-testid attributes with the developers and wrote a short guide. Result: fixing a UI change went from half a day to under an hour, and new joiners wrote tests faster.
16
Your test framework leaks memory during long runs and Jenkins agents crash. How do you investigate?
Check whether drivers are always quit, ThreadLocal values are removed, and static lists or maps keep growing, such as collecting screenshots or response objects. Enable heap dumps with -XX:+HeapDumpOnOutOfMemoryError and analyse with a tool like VisualVM or Eclipse MAT to see which objects hold memory. Fix the leak and tune Surefire's forked JVM memory with argLine if needed.
17
Mobile tests pass on the emulator but fail on a low-end real device. How do you investigate?
Low-end devices are slower, so fixed waits and short timeouts expire before screens render. Replace sleeps with explicit waits and increase timeouts sensibly. Check for vendor-specific pop-ups, battery optimisation dialogs or different keyboards on that brand. Compare screen size and resolution, since coordinate-based taps break. Collect device logs with adb logcat and screen recordings to see what the app was doing. Also check whether the app crashed due to low memory.
18
How do you verify response time and headers in REST Assured?
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.
20
How would you automate a login flow with multiple user roles?
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.
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.
24
How do you run JMeter tests in a Jenkins pipeline and fail the build when an SLA is breached?
Run JMeter in non-GUI mode in a pipeline stage, ideally inside a Docker image with a pinned JMeter version, and archive the JTL and HTML report. Enforce SLAs with Duration Assertions or a JSR223 check, or parse the JTL in a script that compares 95th percentile and error rate with thresholds and exits non-zero. The Jenkins Performance plugin can also mark builds unstable or failed based on thresholds and trends.
25
You see ConcurrentModificationException in your test utility. What causes it and how do you fix it?
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.
26
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.
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.
28
What is the difference between parallel="methods", "classes" and "tests" in testng.xml?
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.
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 git revert <commit>, which creates a new commit that reverses the changes and keeps history intact, safe for shared branches. git reset moves the branch pointer backwards and is fine for local commits, but resetting and force-pushing a shared branch rewrites history and breaks teammates' clones. If force push is truly needed, use --force-with-lease and tell the team.
Automate stable, repetitive, high-risk and data-heavy flows (smoke, regression). Skip one-time tests, frequently changing UI and checks needing human judgement. Compare run frequency × manual time with build and maintenance cost.
33
What is the difference between git merge and git rebase?
Merge combines branches by creating a merge commit, keeping the full history exactly as it happened. Rebase replays your commits on top of another branch, producing a straight, linear history without a merge commit. Rebase is good for tidying a local feature branch before a pull request; never rebase commits that others have already pulled, because it rewrites history.
34
How do you mock an external API in automation tests?
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.
35
How do you run only selected scenarios using tags in Cucumber?
Add tags like @smoke or @regression above a Feature or Scenario, then filter with a tag expression. In the runner use @ConfigurationParameter(key = FILTER_TAGS_PROPERTY_NAME, value = "@smoke and not @wip") with the JUnit Platform engine, or pass -Dcucumber.filter.tags="@smoke" from Maven. Tag expressions support and, or, not and brackets, so CI can run smoke on every commit and regression nightly.
36
What is the difference between imperative and declarative Gherkin?
Imperative Gherkin lists UI actions: enter username, enter password, click submit. Declarative Gherkin states intent: Given a registered customer is logged in. Declarative steps are shorter, survive UI changes and are understood by business people; the UI detail lives in step definitions and page objects. Imperative style is acceptable only when the exact interaction is the behaviour being tested.
37
What is JsonPath and how do you use it for nested JSON?
JsonPath (Groovy GPath syntax in REST Assured) navigates JSON with dot notation. For {"data":{"items":[{"price":10}]}} you use data.items[0].price. You can also filter: data.items.findAll { it.price > 5 }.name returns names of items costing more than 5. Use it inside body() assertions or via response.jsonPath().getList("data.items.name") to extract values for further checks.
A special method that initialises an object. It can be overloaded with different parameters, and testers use it to pass the WebDriver into page classes.
39
How do you record videos of tests running on a Docker Selenium Grid?
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.
40
What is the Transaction Controller in JMeter used for?
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.
Tips to crack the KPMG Automation Testing interview
Learn basics of IT audit, internal controls and risk frameworks, since advisory roles often combine data with governance work.
Practise structured answers for guesstimates and business problems, explaining assumptions clearly step by step.
Prepare examples of working with stakeholders and meeting deadlines, which are common themes in Big Four interviews.
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; KPMG interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the KPMG Automation Testing interview?
Candidates usually go through 4 stages: Online assessment or screening test; Technical interview; Managerial or case round; Partner 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 KPMG Automation Testing interview?
This practice set leans on Core Java for Testers (6), Selenium WebDriver (5), REST Assured (5), TestNG Framework (5). Revise those first, then practise explaining one or two of your own projects end to end, because most KPMG interviewers ask you to walk through real work.
Are these the exact questions asked at KPMG?
No. These are curated practice questions that match the skills and difficulty usually tested in consulting interviews like KPMG's. They are not a leaked or verified list of past questions.
Where does KPMG hire Automation Testing professionals in India?
KPMG has large teams in Gurugram, Bengaluru, Mumbai, Hyderabad, Pune. Openings and locations change often, so check the KPMG careers page and filter by city and experience.
Automation Testing questions for similar companies