Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Nagarro hiring for Automation Testing roles
Nagarro is a digital engineering and technology consulting company with a large workforce in India. It works on custom software, digital product engineering, testing, cloud and data projects for clients in Europe, North America and other regions. In India it hires for software engineers, test engineers and data professionals.
For Automation Testing roles, this Nagarro practice set focuses most on REST Assured (7), Appium Mobile Automation (6), Git, Maven and Jenkins (5), TestNG Framework (5). It has 15 easy, 24 medium, 1 hard questions, so you can start easy and work up to the harder ones.
Company type
IT services
Headquarters
Munich, Germany
Main India offices
Gurugram, Jaipur
Nagarro Automation Testing interview process
Online assessment (aptitude + reasoning)
Coding test
Technical interview
Managerial or HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for NagarroStart 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 verify response time and headers in REST Assured?
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.
03
What is the difference between continuous delivery and continuous deployment?
In continuous delivery every change that passes the pipeline is ready to release, but a person approves the production deployment. In continuous deployment every passing change is released to production automatically. Continuous deployment requires very reliable automated tests and monitoring, because there is no manual check before users see the change.
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.
05
A teammate compares two strings with == and the test sometimes passes and sometimes fails. Explain.
== compares object references, not content. String literals are interned, so two literals with the same text may share a reference and == returns true, but strings read from the UI or built at runtime are new objects, so == returns false even with the same text. Use equals() or equalsIgnoreCase() for content, and Objects.equals() to be null-safe.
06
Write a Dockerfile that runs a Maven and TestNG test suite.
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.
08
What are the advantages of version control for test code?
Situation: I moved from manual testing into an automation team using Java. Task: become productive within a month. Action: I practised core Java daily, focusing on OOP, collections and exceptions, solved small coding problems, and read the existing framework code with a senior's help. Result: in four weeks I was writing page objects and tests that passed review, and I kept learning streams afterwards.
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.
13
What is the execution order of TestNG annotations?
Hooks are Java methods annotated with @Before, @After, @BeforeStep and @AfterStep that run around scenarios or steps. Background is visible in the feature file and describes business preconditions; hooks are hidden technical setup such as starting the browser, cleaning data or attaching screenshots. Hooks can be ordered with the order attribute and filtered by tag expressions, for example @Before("@ui").
Appium Inspector is a desktop or web tool that connects to an Appium server with your capabilities and shows a live screenshot of the app with its element tree. Clicking an element shows its attributes such as accessibility id, resource-id, text and bounds, and suggests locators. You can also try taps and swipes interactively. Testers use it to find stable locators and to check whether an element is really present before writing code.
GraphQL usually has one endpoint and you send a POST with a query and variables. Tests check the data returned matches the requested fields, that errors appear in the errors array, often with status 200, and that authorization applies per field. Also test query depth limits and nested queries for performance. REST Assured works fine by sending the query as JSON body.
18
What is RemoteWebDriver and how is it different from ChromeDriver?
ChromeDriver starts and controls a browser on the same machine as the test. RemoteWebDriver sends the same WebDriver commands over HTTP to a remote endpoint, such as a Selenium Grid, a Docker container or a cloud provider, which starts the browser elsewhere. You pass the Grid URL and browser options, and the rest of the test code stays the same. ChromeDriver itself actually extends RemoteWebDriver.
19
How do you test that a method throws an expected exception in TestNG?
Use @Test(expectedExceptions = IllegalArgumentException.class) and optionally expectedExceptionsMessageRegExp to check the message. The test passes only if that exception is thrown. For more control, use Assert.assertThrows(IllegalArgumentException.class, () -> service.withdraw(-5)), which returns the exception so you can inspect it further. This style is clearer because the check applies to one line, not the whole test.
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.
21
Tell me about a time your API tests caught a breaking change before the UI tests did.
Situation: a backend team renamed a response field during a refactor. Task: our nightly REST Assured suite had to protect the mobile and web clients. Action: schema validation failed within minutes of the merge, and I shared the failing response and the contract with the developer. Result: the field was restored with a deprecation plan before the UI suite even ran, and the team added our schema tests to their pull request checks.
22
Chrome inside a Docker node keeps crashing with session deleted because of page crash. How do you fix it?
This is almost always shared memory exhaustion, because Docker's default /dev/shm of 64 MB is too small for Chrome. Set shm_size: 2gb in Compose or --shm-size=2g in docker run. Also check the container's memory limit and the number of sessions per node, since several browsers in one container multiply memory use. Heavy pages or memory leaks in long sessions can also crash tabs, so restart sessions between test classes.
Situation: my team needed Android regression tests and I only knew Selenium. Task: deliver a smoke suite in one month. Action: I learned Appium 2 setup, used Appium Inspector to find locators, asked developers to add accessibility ids, and reused our TestNG, POM and reporting structure with a new driver factory. Result: twenty smoke tests ran nightly on emulators within four weeks, and release smoke testing dropped from half a day to forty minutes.
Use then().header("Content-Type", containsString("application/json")) and then().cookie("sessionId", notNullValue()). To read values, use response.getHeader("X-Request-Id") or response.getCookie("sessionId"). Header checks matter for caching, security headers like Strict-Transport-Security, and correlation IDs used when debugging failures across services. Also assert that sensitive headers such as server version details are not exposed.
A short summary line under about 60 characters in the imperative mood, like "Add retry for flaky payment test", followed by a blank line and a body explaining why the change was made if not obvious. Reference the ticket ID. Small focused commits with clear messages make reviews faster and help when using git log or git bisect to find when a test broke.
28
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.
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.
31
How do you log requests and responses in REST Assured?
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.
32
Why is JSR223 with Groovy preferred over BeanShell in JMeter?
JSR223 elements with Groovy compile scripts once and cache them, so they run much faster and use less CPU under load. BeanShell is interpreted on every call and becomes a bottleneck at high thread counts. Groovy also supports modern Java syntax and is the default JSR223 language. Enable caching by keeping the cache compiled script option on and passing values through vars or parameters, not by embedding ${} inside the script.
33
Write Appium code to scroll to an element by its text using UiScrollable on Android.
// Scrolls the first scrollable container until the text is visible
String selector = "new UiScrollable(new UiSelector().scrollable(true))"
+ ".scrollIntoView(new UiSelector().text(\"Order History\"))";
WebElement item = driver.findElement(AppiumBy.androidUIAutomator(selector));
item.click();
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.
35
What is the Maven Surefire plugin and how do you configure it for TestNG?
Surefire runs tests during the test phase. For TestNG, configure suiteXmlFiles with the path to testng.xml, so mvn test runs that suite. You can pass system properties, set parallel and threadCount, and control reports. Make the suite file a property like ${suiteXml} so CI can choose smoke.xml or regression.xml with -DsuiteXml=smoke.xml.
36
What is the difference between hard and soft assertions?
extract().response() returns the full Response object, so you can read status, headers, cookies, body as string, and use jsonPath() several times. extract().path("field") returns one value directly from the body. Use path() when you need a single value like an id or token, and response() when you need many details or want to log the response.
38
How do you handle a dropdown that is not a <select> tag?
@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.
40
What is the difference between a Docker image and a container?
An image is a read-only template that contains an operating system layer, software and configuration, for example selenium/standalone-chrome with Chrome and ChromeDriver installed. A container is a running instance of an image with its own process, network and writable layer. You can start many containers from one image and destroy them after a test run. This is why every run starts from the same clean browser environment.
Tips to crack the Nagarro Automation Testing interview
Practise coding questions along with logical reasoning, as Nagarro assessments usually combine both.
Learn about Nagarro's flat, entrepreneurial culture and its CARING values for behavioural answers.
Be ready to explain testing approaches and agile practices, since many projects follow agile delivery with distributed teams.
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; Nagarro interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Nagarro Automation Testing interview?
Candidates usually go through 4 stages: Online assessment (aptitude + reasoning); Coding test; Technical interview; Managerial 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 Nagarro Automation Testing interview?
This practice set leans on REST Assured (7), Appium Mobile Automation (6), Git, Maven and Jenkins (5), TestNG Framework (5). Revise those first, then practise explaining one or two of your own projects end to end, because most Nagarro interviewers ask you to walk through real work.
Are these the exact questions asked at Nagarro?
No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Nagarro's. They are not a leaked or verified list of past questions.
Where does Nagarro hire Automation Testing professionals in India?
Nagarro has large teams in Gurugram, Jaipur. Openings and locations change often, so check the Nagarro careers page and filter by city and experience.
Automation Testing questions for similar companies