Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Protiviti hiring for Automation Testing roles
Protiviti is a global consulting firm that is a subsidiary of Robert Half. It specialises in internal audit, risk and compliance, technology consulting, cybersecurity, data analytics and business process improvement. In India it operates through a member firm and hires analysts and consultants for risk advisory, IT audit, security, finance transformation and technology implementation roles for clients across many sectors.
For Automation Testing roles, this Protiviti practice set focuses most on Core Java for Testers (7), TestNG Framework (6), Selenium WebDriver (6), Cucumber and BDD (5). It has 5 easy, 26 medium, 9 hard questions, so you can start easy and work up to the harder ones.
Company type
Consulting
Headquarters
Menlo Park, California, USA
Main India offices
Gurugram, Mumbai, Bengaluru, Hyderabad
Protiviti Automation Testing interview process
Resume screening or online assessment
Technical interview
Managerial round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for ProtivitiStart 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 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.
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.
03
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.
04
How did you handle it when your test estimates turned out to be wrong in a sprint?
Situation: I estimated three days to automate a new module, but the UI had complex dynamic tables. Task: still deliver what the sprint needed. Action: I told the lead early on day two, proposed automating the API checks first and the UI flows next sprint, and documented the extra effort. Result: the sprint goal was met, and I now spike unfamiliar screens before estimating.
05
Parallel TestNG runs open browsers that interact with each other's tests. How do you fix it?
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.
06
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.
07
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.
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.
09
Why do you want to work as an automation tester rather than a manual tester?
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.
10
How do you handle a dropdown that is not a <select> tag?
Add a health check stage that pings dependencies before tests and marks the run as environment failure rather than test failure. For tests that do not need the real service, use stubs. Escalate with data on downtime frequency to the team owning the service. Keep a separate scheduled job for the real integration tests so pull requests are not blocked.
12
A click works locally but throws ElementClickInterceptedException in CI. How do you fix it?
Another element, such as a cookie banner, loader overlay or sticky header, covers the target. In CI the window is often smaller, so the layout differs. Set a fixed window size, wait for the overlay to disappear with invisibilityOfElementLocated, close banners in setup and scroll the element into view. Use a JavaScript click only as a last resort, since it bypasses real user behaviour.
13
How do you attach a screenshot to the Cucumber report when a scenario fails?
It probably uses a shared static SimpleDateFormat, which is not thread-safe, so parallel threads corrupt each other's parsing. Replace it with java.time DateTimeFormatter, which is immutable and thread-safe, and LocalDate or LocalDateTime for values. Generally, avoid shared mutable static objects in test utilities that run in parallel.
15
Cucumber says a step is undefined even though the step definition exists. How do you fix it?
Check the glue path in the runner points to the package containing the step classes. Check the step text matches exactly, including quotes and parameter types, since {string} expects quoted text. Confirm the step class is under src/test/java and compiled, the annotation import is io.cucumber.java.en, and the Cucumber versions of core, java and the runner module match. Running with dryRun shows all unmatched steps quickly.
16
You configured 50 parallel threads but only 8 tests run at a time on the Grid. Why?
The Grid only has 8 free slots, so the other requests wait in the New Session Queue. Total parallelism equals nodes multiplied by max sessions per node, not the TestNG thread count. Check the Grid UI for slot count. To run more, scale the node containers, raise max sessions if hardware allows, or use a larger grid. Otherwise reduce threads to match slots so waiting requests do not time out.
17
Tell me about a time a performance test found a serious issue before release.
Situation: a new search feature passed functional testing. Task: run a load test at expected peak traffic. Action: at 150 users the 95th percentile jumped from under one second to nine seconds. I correlated it with database metrics, found a full table scan caused by a missing index and shared the query and graphs with developers. Result: after the fix, response time stayed under 800 milliseconds at 400 users, and release went ahead on time.
18
What is the difference between == and equals() in Java?
An idempotent operation gives the same result no matter how many times it is called. GET, PUT and DELETE should be idempotent; POST usually is not. Testers verify that repeating a PUT does not create duplicates and that a second DELETE returns a sensible status like 404 or 204. Retries in networks and CI make idempotency important to verify.
20
How do you run the same test with data from Excel using a DataProvider?
Write a utility that reads the sheet with Apache POI and returns Object[][] with one row per test case. Create a @DataProvider method that calls the utility, and set dataProvider = "loginData" on the test. Each row runs as a separate test with its own result. Keep the file in src/test/resources and consider CSV or JSON, which are easier to review in Git.
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.
Give each device its own session: unique appium:udid, a separate appium:systemPort for UiAutomator2 and, for hybrid apps, a separate chromedriverPort. Store the driver in a ThreadLocal so threads never share it. Pass device details through TestNG parameters or a DataProvider and run with parallel="tests", one test tag per device. One Appium server can handle several sessions, or use a Selenium Grid 4 with Appium nodes or a cloud device farm for larger matrices.
24
You join a project where tests call driver.findElement directly everywhere. How do you move to POM?
I would not rewrite everything at once. First create the base structure: DriverManager, BasePage and config. Then pick the most-used flows, such as login and navigation, create page objects for them and migrate tests touching those pages. Agree that new tests must use POM, and migrate old tests when they are next changed. Track progress so the team sees improvement in maintenance time.
25
What is a DataTable in Cucumber and how do you use it?
A DataTable passes a table written under a step into the step definition. You can read it as List<String>, List<Map<String,String>>, Map<String,String> or convert rows into objects with a @DataTableType method. For example a step that creates several users can take a table of name, role and email. Unlike Scenario Outline, a DataTable feeds data into one step and the scenario runs once.
26
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.
27
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.
28
What is the difference between an array and an ArrayList?
Cucumber Expressions are the default, simpler way to match steps, using parameter types like {int}, {string}, {word} and {float}. For example "I add {int} items" captures a number and converts it to an Integer automatically. Regular expressions are still supported and offer more control, but are harder to read. Teams usually prefer Cucumber Expressions and define custom parameter types for domain values.
30
You need the same test to support Chrome, Firefox and Edge. How would you design driver creation in Java?
Use a factory: a BrowserType enum and a DriverFactory.create(BrowserType) that returns the right WebDriver with its options, using a switch. Read the browser from a system property with a default. For remote runs, return RemoteWebDriver with the same options. Tests depend only on the WebDriver interface, so adding a new browser changes one class, following the open-closed principle.
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.
32
You must read test data from a 50,000-row CSV for a data-driven test. How do you handle it efficiently in Java?
Do not load everything as one giant DataProvider; that creates thousands of UI tests. First question whether all rows need UI runs; most can be validated at API level. Read the file with BufferedReader or Files.lines() as a stream, filter to the rows you need, and use a lazy Iterator<Object[]> DataProvider so rows load as tests run, keeping memory low.
Generally no. Page objects should expose state and actions, such as getErrorMessage() or isLoggedIn(), and tests should make the assertions. This keeps page classes reusable across positive and negative tests and keeps the test intent visible. A small exception is a simple check that the correct page has loaded, often done in the constructor or an isAt() method.
34
How do you handle a test that is flaky only in headless mode?
Check whether the element is inside an iframe or shadow DOM, the locator matches a different hidden element first, the page opened in a new tab not yet switched to, or the wait condition is wrong, such as presence versus visibility versus clickable. Use findElements to see how many matches the locator has and verify it in browser DevTools.
36
What is the difference between git reset --soft, --mixed and --hard?
All three move the current branch to another commit, but treat your changes differently. Soft keeps the changes staged, which is useful to squash recent commits. Mixed, the default, keeps the changes in the working folder but unstages them. Hard throws away staged and working changes completely, so use it carefully. Never reset commits that are already pushed to a shared branch; use git revert there instead.
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.
38
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.
39
What is the difference between driver.close() and driver.quit()?
TestNG has built-in groups, dependencies, suite XML, DataProvider and flexible parallel options, which suit large Selenium suites. JUnit 5 has a modular platform, tags, parameterized tests, extensions and strong IDE and tool support, and is the default for Spring and Cucumber's JUnit Platform engine. Both are capable; the choice usually follows team standards and existing frameworks.
Tips to crack the Protiviti Automation Testing interview
Learn the basics of internal audit, risk management and controls, along with frameworks such as COSO for advisory interviews.
For technology consulting roles, revise cybersecurity basics, SQL and data visualisation, and mention any relevant certifications you are pursuing.
Practise explaining technical ideas in simple business language, since consultants often present findings to non-technical client stakeholders.
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; Protiviti interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Protiviti Automation Testing interview?
Candidates usually go through 4 stages: Resume screening or online assessment; Technical interview; 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 Protiviti Automation Testing interview?
This practice set leans on Core Java for Testers (7), TestNG Framework (6), Selenium WebDriver (6), Cucumber and BDD (5). Revise those first, then practise explaining one or two of your own projects end to end, because most Protiviti interviewers ask you to walk through real work.
Are these the exact questions asked at Protiviti?
No. These are curated practice questions that match the skills and difficulty usually tested in consulting interviews like Protiviti's. They are not a leaked or verified list of past questions.
Where does Protiviti hire Automation Testing professionals in India?
Protiviti has large teams in Gurugram, Mumbai, Bengaluru, Hyderabad. Openings and locations change often, so check the Protiviti careers page and filter by city and experience.
Automation Testing questions for similar companies