Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Nykaa hiring for Automation Testing roles
Nykaa, operated by FSN E-Commerce Ventures, is an Indian beauty, personal care and fashion e-commerce company with both online and offline stores. Its technology and analytics teams work on search, recommendations, marketing, inventory and customer analytics. It hires for software engineers, SDETs, business analysts and data analysts.
For Automation Testing roles, this Nykaa practice set focuses most on Selenium WebDriver (10), Core Java for Testers (8), TestNG Framework (5), Page Object Model (3). It has 36 medium, 4 hard questions, so you can start easy and work up to the harder ones.
Company type
E-commerce & consumer tech
Headquarters
Mumbai, India
Main India offices
Mumbai, Gurugram, Bengaluru
Nykaa Automation Testing interview process
Online assessment or assignment
Technical or case round
Hiring manager round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for NykaaStart 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
A dropdown option list loads only after typing three letters. How do you automate selecting a value?
Type the text with sendKeys, wait for the suggestion list with visibilityOfAllElementsLocatedBy, then find the option whose text matches the required value and click it. Avoid selecting by index because suggestion order may change. If the list is virtualised, type more characters to narrow results. Verify the selected value in the input afterwards.
02
Tests run fine on Chrome but fail on Firefox at the same step. How do you investigate?
Rerun on Firefox with screenshots and logs. Common causes are timing differences, different default window sizes, unsupported CSS or JavaScript behaviour, alerts handled differently, or a driver version mismatch. Compare the DOM in both browsers at that step. Fix by using explicit waits, setting window size, and reporting genuine browser bugs to developers.
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
What is the difference between @BeforeTest and @BeforeMethod?
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.
08
What is the difference between a declarative and a scripted Jenkins pipeline?
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.
09
Write a JSR223 Groovy PostProcessor that reads a JSON response and stores a value as a JMeter variable.
Generics let classes and methods work with a type parameter while keeping compile-time type safety, such as List<String> or a method <T> T readJson(String path, Class<T> type). In a framework they let you write one reusable helper for many types, for example a generic API client that deserializes responses into any POJO, or a BasePage method that returns the correct page type for chaining. They remove casts and catch type errors at compile time.
11
What are Java collections and which ones do testers use most?
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.
@DataProvider returns Object[][]; a @Test(dataProvider = "name") method runs once per row — the basis of data-driven tests, often reading Excel or JSON.
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.
15
What is the difference between the normal, eager and none page load strategies in Selenium?
Page load strategy decides when navigation commands like get() return. Normal, the default, waits for the full load event including images and stylesheets. Eager returns when the DOM is ready (DOMContentLoaded), which speeds up heavy pages. None returns immediately after the initial response. With eager or none you must rely on explicit waits for the elements you need. Set it through options.setPageLoadStrategy(PageLoadStrategy.EAGER).
16
Tell me about a time you mentored a junior tester in Java and automation.
Situation: two new joiners from manual testing struggled with framework code. Task: help them contribute within a sprint. Action: I paired with them daily for an hour, gave small tasks like adding a locator then a full test, and reviewed their code with explanations rather than rewriting it. Result: within three weeks both were writing tests independently, and our automation backlog shrank.
Add the rerun plugin, for example rerun:target/failed.txt, to the main runner. It writes the location of each failed scenario. Create a second runner whose features point to @target/failed.txt and run it after the main run in Maven or Jenkins. Use reruns to separate real failures from flaky ones, but track flaky scenarios and fix them instead of hiding them.
Send invalid or missing fields, wrong data types, values beyond limits, invalid IDs, expired or missing tokens, wrong HTTP methods and malformed JSON. Assert the correct status (400, 401, 403, 404, 405, 422) and a clear error body without stack traces. Negative tests often find more defects than happy paths because validation and security checks are frequently incomplete.
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.
Situation: our developers were in another time zone and test failures waited a day for replies. Task: reduce delays. Action: I wrote clear failure reports with screenshots, logs and steps, recorded short videos for complex issues, and set a fixed 30-minute overlap call twice a week. Result: turnaround on defects dropped from two days to about one, and fewer issues bounced back.
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.
27
How do you use Cucumber with REST Assured for API BDD tests?
Write scenarios in business terms, such as "When a customer places an order for 2 items". In step definitions, build the request with REST Assured, store the Response in a shared scenario context, and assert in Then steps using then().statusCode() and JSON path checks. Keep base URI, auth and specs in a helper class so steps stay short and the same steps serve many features.
28
How do you handle a test that is flaky only in headless mode?
Use official Selenium images, either standalone-chrome for simple runs or a Grid with hub and node containers via Docker Compose. The test container or Jenkins agent points RemoteWebDriver to http://selenium-hub:4444. Containers give the same browser version everywhere and are cleaned after each run. Add shm_size for Chrome stability and record videos for failed tests if needed.
31
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.
32
How do you undo a commit that has already been pushed?
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.
33
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.
34
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();
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.
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.
38
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.
Store each driver in a ThreadLocal so every thread gets its own instance and tests do not interfere.
Tips to crack the Nykaa Automation Testing interview
Prepare cases on beauty e-commerce like repeat purchases, private label growth or offline store performance.
Practise SQL and Excel analysis on customer and order data, focusing on retention and basket size.
Use the Nykaa and Nykaa Fashion apps and suggest measurable improvements to discovery or checkout.
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; Nykaa interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Nykaa Automation Testing interview?
Candidates usually go through 4 stages: Online assessment or assignment; Technical or case round; Hiring manager 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 Nykaa Automation Testing interview?
This practice set leans on Selenium WebDriver (10), Core Java for Testers (8), TestNG Framework (5), Page Object Model (3). Revise those first, then practise explaining one or two of your own projects end to end, because most Nykaa interviewers ask you to walk through real work.
Are these the exact questions asked at Nykaa?
No. These are curated practice questions that match the skills and difficulty usually tested in e-commerce & consumer tech interviews like Nykaa's. They are not a leaked or verified list of past questions.
Where does Nykaa hire Automation Testing professionals in India?
Nykaa has large teams in Mumbai, Gurugram, Bengaluru. Openings and locations change often, so check the Nykaa careers page and filter by city and experience.
Automation Testing questions for similar companies