Skip to content

Grant Thornton Bharat Automation Testing Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

About Grant Thornton Bharat hiring for Automation Testing roles

Grant Thornton Bharat is the Indian member firm of the Grant Thornton global network of audit, tax and advisory firms. It provides assurance, tax, risk advisory, deals, forensic and digital consulting services to businesses and government organisations. In India it hires for audit, risk consulting, cybersecurity, data analytics and technology roles, with offices in metros and several tier-2 cities.

For Automation Testing roles, this Grant Thornton Bharat practice set focuses most on REST Assured (7), Core Java for Testers (7), Selenium WebDriver (5), Cucumber and BDD (4). It has 9 easy, 26 medium, 5 hard questions, so you can start easy and work up to the harder ones.

Company type
Consulting
Headquarters
New Delhi, India
Main India offices
Gurugram, Mumbai, Bengaluru, Kolkata, Chandigarh, Kochi

Grant Thornton Bharat Automation Testing interview process

  1. Resume screening or online assessment
  2. Technical interview
  3. Managerial round
  4. Partner or HR round

Typical pattern based on public candidate experiences. Rounds vary by role, team and year.

Solved for Grant Thornton BharatStart 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

Your Selenium tests in CI produce blank screenshots in headless mode. What could be wrong?

Save to ▾
Show answer
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.
02

What is a Jenkins pipeline?

Save to ▾
Show answer
A scripted or declarative Jenkinsfile that defines stages such as build, test and deploy as code stored with the project.
03

Write a REST Assured PUT test that updates a resource using a POJO.

Save to ▾
Show answer
@Test public void updateUser() { User update = new User("Ravi", "Lead QA"); given().spec(req) .pathParam("id", 7) .body(update) .when() .put("/users/{id}") .then() .statusCode(200) .body("job", equalTo("Lead QA")); }
04

What are the main elements of a JMeter test plan?

Save to ▾
Show answer
A test plan contains Thread Groups that simulate users, Samplers such as HTTP Request that send requests, Config Elements like HTTP Request Defaults, CSV Data Set Config and Header Manager, Logic Controllers that control flow, Timers that add think time, Pre and Post Processors that prepare data or extract values, Assertions that validate responses, and Listeners that collect results. Elements apply according to their scope in the tree.
05

How would you automate a login flow with multiple user roles?

Save to ▾
Show answer
Keep credentials in external data, parameterise the test with a data provider, reuse a login method in a page class, and clear sessions between roles.
06

Write a docker-compose.yml that runs a Selenium hub with Chrome and Firefox nodes.

Save to ▾
Show answer
services: selenium-hub: image: selenium/hub:4.25.0 ports: - "4442:4442" - "4443:4443" - "4444:4444" chrome: image: selenium/node-chrome:4.25.0 shm_size: 2gb depends_on: - selenium-hub environment: - SE_EVENT_BUS_HOST=selenium-hub - SE_EVENT_BUS_PUBLISH_PORT=4442 - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 firefox: image: selenium/node-firefox:4.25.0 shm_size: 2gb depends_on: - selenium-hub environment: - SE_EVENT_BUS_HOST=selenium-hub - SE_EVENT_BUS_PUBLISH_PORT=4442 - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
07

ArrayList vs HashMap — how do you use them in a framework?

Save to ▾
Show answer
ArrayList stores an ordered list (e.g. all product names on a page). HashMap stores key–value pairs (e.g. test data or config properties).
08

How do you attach a screenshot to the Cucumber report when a scenario fails?

Save to ▾
Show answer
@After public void afterScenario(Scenario scenario) { if (scenario.isFailed()) { byte[] shot = ((TakesScreenshot) driver) .getScreenshotAs(OutputType.BYTES); scenario.attach(shot, "image/png", scenario.getName()); } driver.quit(); }
09

What is REST Assured?

Save to ▾
Show answer
A Java library that makes API tests readable using given-when-then, with easy request building, response validation and JSON path support.
10

How do you validate an XML response in REST Assured?

Save to ▾
Show answer
// 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"));
11

An element is visible in Appium Inspector but your test throws NoSuchElementException on the device. What do you check?

Save to ▾
Show answer
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.
12

How do you log requests and responses in REST Assured?

Save to ▾
Show answer
Use given().log().all() for the full request and then().log().all() for the full response. To reduce noise, use log().ifValidationFails() on both, which prints only when a test fails. For a whole suite, set RestAssured.enableLoggingOfRequestAndResponseIfValidationFails() or add RequestLoggingFilter and ResponseLoggingFilter in a shared spec. Mask tokens and passwords before logs reach CI.
13

A TestNG test passes when run alone but fails when the full class runs. What do you check?

Save to ▾
Show answer
Look for shared state between methods: instance or static fields changed by earlier tests, data created or deleted by another test, cookies or logged-in session kept in the same browser, and priority or order assumptions. Run the class in a different order to confirm. Fix by resetting state in @BeforeMethod, creating unique data per test and avoiding static fields.
14

How do you upload a file with Selenium?

Save to ▾
Show answer
If the element is <input type="file">, use element.sendKeys("C:/path/file.pdf"). Use the Robot class or AutoIt only as a last resort for OS dialogs.
15

How do you test an application that requires login on every test without slowing the suite?

Save to ▾
Show answer
Log in once through the API, capture the session cookie or token, and inject it into the browser with driver.manage().addCookie() after opening the domain, or set local storage with JavaScript. Then navigate directly to the page under test. Keep one real UI login test to cover the login page itself. This often saves several seconds per test.
16

What is ITestContext in TestNG and how can you use it to share data?

Save to ▾
Show answer
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.
17

Tell me about a time a CI pipeline you owned broke right before a release.

Save to ▾
Show answer
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.
18

Difference between final, finally and finalize?

Save to ▾
Show answer
final makes a variable, method or class unchangeable; finally is a block that always runs after try-catch; finalize is a deprecated method called before garbage collection.
19

How do you pass authentication in an API test?

Save to ▾
Show answer
Use headers such as Bearer tokens, basic auth, API keys or OAuth flows; fetch a token in a setup step and reuse it.
20

How do you manage test data in a framework?

Save to ▾
Show answer
Use external files or APIs and database setup scripts, generate unique data per run, and clean up afterwards so tests stay independent.
21

Parallel TestNG runs open browsers that interact with each other's tests. How do you fix it?

Save to ▾
Show answer
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.
22

How do you read data from Excel or properties files in Java?

Save to ▾
Show answer
Use Apache POI for Excel and the Properties class for config files, loaded in a utility class so tests read data instead of hard-coding it.
23

What is Docker and how does it help tests?

Save to ▾
Show answer
Docker packages tools in containers so tests run identically everywhere; Selenium Grid and browsers can be started quickly in containers.
24

What is the Cucumber runner class and what does it configure?

Save to ▾
Show answer
The runner tells the test engine where features and glue code are and how to report. With JUnit 5 it uses @Suite, @IncludeEngines("cucumber"), @SelectClasspathResource("features") and @ConfigurationParameter for glue, plugins and tags. With TestNG you extend AbstractTestNGCucumberTests and use @CucumberOptions(features, glue, tags, plugin, monochrome). The runner lets Maven or Jenkins run features like normal tests.
25

What is a DataTable in Cucumber and how do you use it?

Save to ▾
Show answer
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

How do you increase the number of Chrome nodes with Docker Compose?

Save to ▾
Show answer
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.
27

What is the Optional class in Java and where is it useful in test code?

Save to ▾
Show answer
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.
28

What are Java collections and which ones do testers use most?

Save to ▾
Show answer
ArrayList and LinkedList for lists, HashSet for unique values, HashMap for key-value test data, and Iterator for traversing them, for example collecting web elements in a list.
29

How have you handled disagreement with a developer about whether something is a bug?

Save to ▾
Show answer
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.
30

What locator strategy do you follow inside page objects?

Save to ▾
Show answer
Prefer stable attributes in this order: dedicated test attributes like data-testid, id, name, then short CSS selectors, and XPath only when text or complex relationships are needed. Avoid absolute XPaths and index-based locators. Keep locators as private final By fields at the top of the class with clear names, so updates are quick and readable.
31

How do you upload a file with REST Assured?

Save to ▾
Show answer
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.
32

What are filters in REST Assured?

Save to ▾
Show answer
Filters intercept requests and responses, similar to middleware. They implement the Filter interface and can add headers, refresh tokens, log traffic, or attach request and response details to Allure reports with AllureRestAssured. You add them with given().filter(myFilter) or globally in a RequestSpecification. Filters keep cross-cutting concerns out of individual tests.
33

How do you handle a web table in Selenium?

Save to ▾
Show answer
Locate rows and columns with XPath such as //table//tr and //td, loop through them to read or click cells, or build the XPath dynamically from the row text.
34

How does HashMap work internally?

Save to ▾
Show answer
It uses the key's hashCode to find a bucket and equals to resolve collisions, giving O(1) average lookups; Java 8 converts long buckets into trees.
35

A third-party payment API is slow and makes your tests time out in CI. What do you do?

Save to ▾
Show answer
Separate concerns: for most functional tests, stub the payment API with WireMock returning success, failure and timeout responses, so tests are fast and deterministic. Keep a small set of integration tests against the sandbox, with longer timeouts and retries for network errors, run on a schedule. Report sandbox slowness separately so it does not block every pull request.
36

How do you record videos of tests running on a Docker Selenium Grid?

Save to ▾
Show answer
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.
37

Tell me about a time a flaky test cost your team time and how you fixed it permanently.

Save to ▾
Show answer
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.
38

What is the difference between SOAP and REST?

Save to ▾
Show answer
SOAP is a strict XML protocol with WSDL and WS-Security; REST is a lighter architectural style using HTTP and usually JSON.
39

What is dryRun in Cucumber and when do you use it?

Save to ▾
Show answer
dryRun=true makes Cucumber parse all feature files and check every step has a matching definition without actually executing anything. It is fast and is useful after writing new features, during refactoring, or as a quick CI gate to catch undefined or ambiguous steps. It also prints snippets for missing step definitions that you can paste and implement.
40

How do you mock an external API in automation tests?

Save to ▾
Show answer
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.

Tips to crack the Grant Thornton Bharat Automation Testing interview

  • Revise accounting and audit basics or IT risk concepts, depending on the service line you are applying to.
  • For technology and risk roles, learn basics of internal controls, IT general controls, cybersecurity frameworks and data analysis in Excel.
  • Prepare to explain why you prefer advisory or audit work and how you handle detail-oriented tasks under tight deadlines.
  • 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; Grant Thornton Bharat interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Grant Thornton Bharat Automation Testing interview?

Candidates usually go through 4 stages: Resume screening or online assessment; Technical interview; Managerial 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 Grant Thornton Bharat Automation Testing interview?

This practice set leans on REST Assured (7), Core Java for Testers (7), Selenium WebDriver (5), Cucumber and BDD (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Grant Thornton Bharat interviewers ask you to walk through real work.

Are these the exact questions asked at Grant Thornton Bharat?

No. These are curated practice questions that match the skills and difficulty usually tested in consulting interviews like Grant Thornton Bharat's. They are not a leaked or verified list of past questions.

Where does Grant Thornton Bharat hire Automation Testing professionals in India?

Grant Thornton Bharat has large teams in Gurugram, Mumbai, Bengaluru, Kolkata, Chandigarh, Kochi. Openings and locations change often, so check the Grant Thornton Bharat careers page and filter by city and experience.

Automation Testing questions for similar companies