Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About PwC hiring for Automation Testing roles
PwC is one of the Big Four professional services networks, offering assurance, tax, consulting and deals services. In India, PwC member firms and acceleration centres support global clients with technology consulting, data analytics, cyber, risk and process work. It hires for associate and consultant roles in analytics, BI, testing, ERP and risk assurance.
For Automation Testing roles, this PwC practice set focuses most on TestNG Framework (7), Page Object Model (5), Git, Maven and Jenkins (5), REST Assured (4). It has 7 easy, 30 medium, 3 hard questions, so you can start easy and work up to the harder ones.
Company type
Consulting
Headquarters
London, United Kingdom
Main India offices
Kolkata, Bengaluru, Mumbai, Hyderabad, Gurugram
PwC Automation Testing interview process
Online assessment (aptitude + technical)
Group discussion or case round
Technical interview
Partner or HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for PwCStart 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.
Fluent page objects return objects from every action so a test reads like a sentence, for example new SearchPage(driver).searchFor("phone").filterByBrand("X").sortByPrice().firstResult(). It improves readability and models navigation. The risk is long chains that hide failures, so keep chains to a single journey and use clear method names that show which page you end on.
03
An API returns a list in random order and your assertion on the first element fails intermittently. How do you fix it?
Do not assert on positions when the API does not guarantee order. Use order-independent Hamcrest matchers such as hasItem, hasItems or containsInAnyOrder on the extracted field, for example body("name", hasItems("Pen", "Book")). Or use GPath filtering like find { it.id == 42 } to pick the right item before checking its fields. If order matters for the feature, raise it as a requirement and request a sort parameter.
04
What is the test pyramid and how does it guide automation?
The pyramid suggests many fast unit tests at the base, fewer API or service tests in the middle and a small number of UI end-to-end tests at the top. Lower-level tests are faster and less flaky. An inverted pyramid with mostly UI tests leads to slow, brittle pipelines. Use it as a guide to put each check at the cheapest level that still catches the bug.
05
An element is visible in Appium Inspector but your test throws NoSuchElementException on the device. What do you check?
First check timing: the screen may still be loading, so add an explicit wait for presence. Then check context: in a hybrid app the element may be in a webview while you are in NATIVE_APP. Confirm the locator matches exactly, including package prefix in resource-id. The element may be off screen in a list, so scroll first. Also check that the Inspector session used the same app build, language and device size as the test.
06
Write a REST Assured test using RequestSpecBuilder and ResponseSpecBuilder.
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.
08
Your retry analyzer makes the suite green but bugs are slipping into production. What is wrong?
Retries are hiding real intermittent defects, such as race conditions, by treating them as flaky tests. Limit retries to one, report retried tests separately as flaky in the dashboard, and require a ticket for each one. Review retried tests weekly to find whether the cause is the test or the product. Retries should buy time to fix, not replace fixing.
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.
11
How do you handle dynamic elements whose ids change?
Performance testing checks how fast, stable and scalable a system is under a given workload. Load testing measures behaviour at expected traffic. Stress testing pushes beyond capacity to find the breaking point and how the system recovers. Spike testing applies sudden jumps in users. Soak or endurance testing runs normal load for hours to find leaks. Scalability testing checks whether adding resources increases capacity as expected.
13
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.
It occurs when one Gherkin step matches two or more step definitions, usually because of broad regular expressions or duplicate methods in different classes within the glue. Fix it by making expressions more specific, anchoring regexes with ^ and $, or removing the duplicate. Keeping step definitions organised by domain and reviewing new steps in pull requests prevents it.
15
How do you attach a screenshot to the Cucumber report when a scenario fails?
Declarative pipelines use a fixed structure: pipeline, agent, stages, steps, post, with built-in options and validation; they are easier to read and are the recommended default. Scripted pipelines use node blocks and full Groovy, giving more flexibility for complex logic but making them harder to maintain. Most test pipelines use declarative syntax with small script blocks only where needed.
18
What are Appium capabilities and which ones are essential to start a session?
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.
19
Your framework throws NullPointerException in a page object on the first action. What are the likely causes?
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.
20
Your code review shows a test class with 30 copy-pasted lines in every method. How do you refactor it with Java features?
Extract repeated steps into private helper methods or a page object, move common setup into @BeforeMethod, and use a DataProvider when only data differs. If the repeated code differs only in a small action, pass that action as a lambda, such as a Consumer<WebDriver>. Rerun the tests after each small refactor to confirm behaviour is unchanged.
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.
23
What is the difference between hard and soft assertions?
Scenario Outline: Login with different users
Given the user is on the login page
When the user logs in with "<username>" and "<password>"
Then the message "<message>" is shown
Examples:
| username | password | message |
| asha | Valid@1 | Welcome Asha |
| asha | wrong | Invalid password |
| locked1 | Valid@1 | Account is locked |
IAnnotationTransformer is a listener that changes @Test annotations at runtime before tests run. A common use is attaching a retry analyzer to every test automatically instead of adding retryAnalyzer to each method, or enabling and disabling tests from configuration. It must be registered in testng.xml or via service loader, not with the @Listeners annotation.
27
How do you set up distributed load testing in JMeter?
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.
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.
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.
31
Which tests should run at each stage of a CI/CD pipeline?
On every commit or pull request: unit tests, static checks and a fast API and UI smoke suite. After deploying to a test environment: broader API and integration tests. Nightly: full UI regression across browsers. Before or after production release: a short production-safe smoke and monitoring checks. Faster feedback first, heavier tests later.
Appium 2 split the monolithic server into a core plus separately installed drivers and plugins, managed with appium driver install and appium plugin install. It dropped the old JSON Wire Protocol in favour of W3C WebDriver only, so vendor capabilities need the appium: prefix. The default base path changed from /wd/hub to /. Old TouchAction and MultiTouchAction were removed from the Java client, so gestures use W3C Actions or mobile: commands.
@Test(timeOut = 5000) fails the test if it runs longer than 5000 milliseconds. It can also be set at suite or test level in testng.xml. It protects pipelines from hanging tests, for example a stuck network call. It is not a performance test; use reasonable limits so slow but correct environments do not cause false failures.
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.
Possibly testFailureIgnore is set to true in Surefire, the shell step uses || true, or the script swallows Maven's exit code. Sometimes tests catch exceptions and never fail. Check the console log for Maven's BUILD result and Surefire summary. Fix the configuration so failures produce a non-zero exit, or use junit publishing to mark the build unstable when tests fail.
38
What does SE_NODE_MAX_SESSIONS control in the Docker Selenium images?
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.
39
During a load test response times rise sharply. Which server-side metrics do you check?
Check CPU and memory usage of application servers, garbage collection pauses and heap usage for Java services, thread pool and connection pool saturation, database slow queries, locks and connection counts, disk I/O and network bandwidth. Also look at load balancer and cache hit rates and error logs. Correlate the timestamp of the slowdown with these graphs in an APM or monitoring tool to find which resource saturated first.
POM adds upfront design effort and extra classes, which can feel heavy for tiny projects. Poorly designed page objects become large god classes, mix assertions with actions, or use deep inheritance chains that are hard to follow. It also does not solve flaky waits or bad test data by itself. Good conventions, components and code reviews are needed to get its benefits.
Tips to crack the PwC Automation Testing interview
Learn about the PwC Professional framework, which covers whole leadership, business acumen, technical capabilities and relationships.
Practise case questions and guesstimates with a clear structure, especially for consulting and advisory roles.
Revise Excel, SQL and a BI tool, and be ready to describe how analysis helped a decision.
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; PwC interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the PwC Automation Testing interview?
Candidates usually go through 4 stages: Online assessment (aptitude + technical); Group discussion or case round; Technical interview; 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 PwC Automation Testing interview?
This practice set leans on TestNG Framework (7), Page Object Model (5), Git, Maven and Jenkins (5), REST Assured (4). Revise those first, then practise explaining one or two of your own projects end to end, because most PwC interviewers ask you to walk through real work.
Are these the exact questions asked at PwC?
No. These are curated practice questions that match the skills and difficulty usually tested in consulting interviews like PwC's. They are not a leaked or verified list of past questions.
Where does PwC hire Automation Testing professionals in India?
PwC has large teams in Kolkata, Bengaluru, Mumbai, Hyderabad, Gurugram. Openings and locations change often, so check the PwC careers page and filter by city and experience.
Automation Testing questions for similar companies