Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Myntra hiring for Automation Testing roles
Myntra is an Indian fashion and lifestyle e-commerce platform and part of the Flipkart group. Its technology and analytics teams work on search, personalisation, size recommendations, pricing, supply chain and marketing. It hires for software engineers, SDETs, business analysts, data analysts and data scientists. Fashion-specific data such as sizing matters a lot.
For Automation Testing roles, this Myntra practice set focuses most on Selenium WebDriver (6), Core Java for Testers (6), TestNG Framework (5), REST Assured (5). It has 3 easy, 31 medium, 6 hard questions, so you can start easy and work up to the harder ones.
Company type
E-commerce & consumer tech
Headquarters
Bengaluru, India
Main India offices
Bengaluru
Myntra Automation Testing interview process
Online assessment (coding or SQL)
Technical or machine coding round
Problem solving or case round
Hiring manager round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for MyntraStart 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.
findElement returns the first match and throws NoSuchElementException if nothing is found. findElements returns a List (empty if nothing is found) — handy to check whether an element exists.
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.
04
Nightly Jenkins regression runs take 4 hours. How would you bring it down?
Measure first: find the slowest tests and setup steps. Then run tests in parallel across Grid nodes or containers, replace UI setup with API calls, remove duplicate coverage, move checks down to API level, split the suite into shards across agents, and cache Maven dependencies. Aim for a smoke stage under 15 minutes on every commit and a parallel regression under an hour.
05
What can testers do with Chrome DevTools Protocol support in Selenium 4?
Selenium 4 exposes CDP through the DevTools interface and the newer cross-browser BiDi APIs. Testers can capture console logs and JavaScript errors, intercept or mock network requests, emulate slow networks or geolocation, add basic authentication headers and collect performance metrics. CDP is Chromium-specific and tied to browser versions, so for long-term code prefer WebDriver BiDi features where available, and keep CDP usage behind a small helper class.
06
What is the difference between @BeforeTest and @BeforeMethod?
Standalone runs every Grid component and a local node in a single process, which suits a laptop or a single container. Hub and node mode runs the router, distributor, queue and session map together as the hub, with separate node processes registering to it, which is the usual team setup. Fully distributed mode runs each component separately, often on Kubernetes, for very large grids that need independent scaling and high availability.
09
How do you validate a JSON response in REST Assured?
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.
Lambdas are short anonymous functions; streams process collections declaratively with filter, map and collect, for example filtering link text from a list of elements.
12
Write a Dockerfile that runs a Maven and TestNG test suite.
The script is probably replaying hard-coded dynamic values, such as a CSRF token, session cookie or auth header captured during recording. The server rejects them because they belong to the old session. Add an HTTP Cookie Manager so cookies are handled per thread, extract the CSRF or bearer token from the login response with an extractor, and replace the recorded value with the variable. Verify with View Results Tree on one thread.
14
PageFactory with @FindBy or By locators: which do you prefer and why?
Many teams now prefer plain By locators with explicit waits. PageFactory proxies look up elements lazily, which can hide timing problems and makes StaleElementReference harder to reason about, and its AjaxElementLocatorFactory waits are less flexible. PageFactory is fine and readable for stable pages. The key is consistency across the framework and always waiting for the right condition before acting.
15
Tell me about a time you worked with a team in a different location or time zone on automation.
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.
16
Tell me about a time a CI pipeline you owned broke right before a release.
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.
17
An API test passes alone but fails when the suite runs in parallel. What could be wrong?
Likely shared state. Common causes are static RestAssured settings changed by one test, shared test data like the same user being updated by two tests, token reuse after another test logged out, or rate limits. Fix by using per-test RequestSpecification instead of global statics, creating unique data per test, isolating tokens, and checking server rate-limit responses such as 429.
18
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.
19
Why do Selenium browser containers need a larger shm_size?
Chrome and Firefox use shared memory at /dev/shm for rendering and inter-process communication. Docker gives containers only 64 MB of shared memory by default, which is not enough for modern pages, so the browser tab crashes with errors like session deleted because of page crash. Setting shm_size to 2g in Compose, or --shm-size=2g with docker run, fixes it. Mounting /dev/shm from the host is an alternative.
20
What is the difference between an array and an ArrayList?
An authorisation framework where a client obtains an access token from an auth server and sends it as a Bearer token; tests fetch and reuse the token in setup.
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.
24
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();
25
How do you take a screenshot on failure in TestNG?
Log the full response with then().log().all() to see the actual body. Common causes are a wrong JSON path, such as missing a wrapper like data, the field being in an array needing an index, a different content type like XML or HTML error page, or the field name having different case. Fix the path, and add a schema check so structure changes are caught clearly.
27
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.
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.
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.
33
What is idempotency in REST APIs and why does it matter for testing?
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.
34
Your API tests started failing with SSL handshake errors on a new test server. What do you do?
First confirm the server uses a self-signed or internal certificate. The proper fix is to import the company CA certificate into a truststore and configure REST Assured with trustStore(path, password). As a temporary measure in a test environment only, relaxedHTTPSValidation() skips checks. Never use relaxed validation against production, and raise the certificate issue with the infra team.
35
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.
36
How do you test an API that depends on another service that is down?
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).
38
How do you pass thread count and duration to a JMeter test from the command line?
// In the Thread Group fields use property functions with defaults
Number of Threads: ${__P(users,10)}
Ramp-up period: ${__P(rampup,30)}
Duration (seconds): ${__P(duration,300)}
// Then override them when running
jmeter -n -t load.jmx -l out.jtl -Jusers=200 -Jrampup=120 -Jduration=1800
39
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.
40
A test configuration value has to be the same for the whole run and accessed from many classes. How do you implement it?
Create a ConfigReader that loads properties once, using a singleton or a static holder initialised lazily in a thread-safe way, and exposes typed getters like getInt("timeout"). Let system properties and environment variables override file values so CI can change them. Keep it read-only after loading so parallel threads cannot change settings mid-run.
Tips to crack the Myntra Automation Testing interview
Prepare cases on fashion e-commerce issues like returns due to size, discount depth or End of Reason Sale planning.
Practise SQL and Python for analytics roles, including cohort and funnel analysis on order data.
Read about Myntra's use of data science in size recommendations and visual search.
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; Myntra interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Myntra Automation Testing interview?
Candidates usually go through 4 stages: Online assessment (coding or SQL); Technical or machine coding round; Problem solving or case round; Hiring manager 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 Myntra Automation Testing interview?
This practice set leans on Selenium WebDriver (6), Core Java for Testers (6), TestNG Framework (5), REST Assured (5). Revise those first, then practise explaining one or two of your own projects end to end, because most Myntra interviewers ask you to walk through real work.
Are these the exact questions asked at Myntra?
No. These are curated practice questions that match the skills and difficulty usually tested in e-commerce & consumer tech interviews like Myntra's. They are not a leaked or verified list of past questions.
Where does Myntra hire Automation Testing professionals in India?
Myntra has large teams in Bengaluru. Openings and locations change often, so check the Myntra careers page and filter by city and experience.
Automation Testing questions for similar companies