Ericsson Automation Testing Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Ericsson hiring for Automation Testing roles
Ericsson is a Swedish telecommunications company that provides network equipment, software and services for mobile operators, including 4G and 5G radio, core networks and network management. In India it supports major telecom operators with network deployment and managed services, and runs research and development centres. It hires telecom engineers, software engineers, testers and network engineers.
For Automation Testing roles, this Ericsson practice set focuses most on Cucumber and BDD (6), REST Assured (6), Selenium WebDriver (5), TestNG Framework (4). It has 10 easy, 26 medium, 4 hard questions, so you can start easy and work up to the harder ones.
Company type
Telecom
Headquarters
Stockholm, Sweden
Main India offices
Gurugram, Bengaluru, Chennai, Noida, Kolkata
Ericsson Automation Testing interview process
Online assessment (aptitude + technical)
Technical interview
Managerial round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for EricssonStart 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
Some scenarios are still being developed and must not run in CI yet. How do you handle them?
Tag them, for example with @wip, and exclude the tag in the CI runner using a tag expression like not @wip, set through the cucumber.filter.tags property or the runner options. Developers can still run them locally by including the tag. Review @wip scenarios regularly so they do not stay parked forever, and never use the tag to hide failing tests that should be fixed or reported as bugs.
It occurs when one Gherkin step matches two or more step definitions, usually because of broad regular expressions or duplicate methods in different classes within the glue. Fix it by making expressions more specific, anchoring regexes with ^ and $, or removing the duplicate. Keeping step definitions organised by domain and reviewing new steps in pull requests prevents it.
03
What is a .gitignore file and what should an automation project ignore?
A .gitignore lists files Git should not track. In a Java automation project ignore target/, test-output/, allure-results/, reports, screenshots, logs, IDE folders like .idea and .vscode, *.iml, OS files like .DS_Store, and local config files holding secrets. Ignoring generated output keeps the repository small and avoids noisy diffs and conflicts.
04
How do you assert on an array in a JSON response using Hamcrest?
Use collection matchers inside body(). For example body("data.id", hasItems(1, 2)), body("data", hasSize(6)), body("data.email", everyItem(containsString("@"))) and body("data.find { it.id == 3 }.name", equalTo("Neha")). These check the whole collection in one line. For complex rules, extract a List with jsonPath().getList() and assert with Java or AssertJ.
05
How do you handle a test that is flaky only in headless mode?
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.
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.
08
Why is XPath slow in Appium and what should you use instead?
For every XPath query Appium must fetch the full page source of the app, convert it into an XML document and then evaluate the expression, which can take seconds on large screens and is even slower on iOS. Index-based XPath also breaks when layouts change. Use accessibility id first, then resource-id, Android UiAutomator selectors or iOS predicate strings and class chains, which are evaluated natively on the device and are much faster.
On a configuration method like @AfterMethod(alwaysRun = true), it makes the method run even when tests fail or are skipped, or when groups filter would exclude it. It is essential for cleanup such as driver.quit(). On a test with dependsOnMethods, alwaysRun = true runs it even if the dependency failed. Missing alwaysRun on teardown is a common cause of leftover browsers in CI.
10
How do you handle dynamic elements whose ids change?
For Allure, install the Allure Jenkins plugin, configure the commandline tool, and add allure results: [[path: 'target/allure-results']] in the post always block. For Extent, archive the HTML file and use the HTML Publisher plugin to show it as a build link. Keep report history per build and share the link in failure notifications.
14
Write a Java stream that extracts and sorts product prices from a list of WebElements.
Use a DriverManager with a ThreadLocal<WebDriver>, created in @BeforeMethod and removed in @AfterMethod. Page objects receive the driver through the constructor or get it from DriverManager.getDriver(). Constructor injection is cleaner and easier to test. Never store the driver in a static field shared by all threads, or parallel tests will control each other's browsers.
16
How do you validate an XML response in REST Assured?
// 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"));
17
What metrics do you track for test automation in CI/CD?
Useful metrics are pass rate per run, flaky test rate, average and slowest test duration, pipeline time to feedback, defects caught by automation versus escaped to production, automation coverage of critical flows and time spent on maintenance. Trend them over weeks. Metrics should drive action, such as fixing the top flaky tests, not just fill dashboards.
18
Tests on the Grid fail with SessionNotCreatedException saying the new session request timed out. What do you check?
It means no matching free slot appeared in time. Check the Grid UI to see whether nodes are registered and whether their capabilities match the request, such as browser name, version or platform. Compare the test thread count with total slots, since extra threads just wait in the queue. Look for stuck sessions holding slots after aborted builds. Then increase capacity, reduce threads, or raise the session request timeout.
19
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.
20
How do you run Selenium tests in Docker containers in CI?
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.
Fluent page objects return objects from every action so a test reads like a sentence, for example new SearchPage(driver).searchFor("phone").filterByBrand("X").sortByPrice().firstResult(). It improves readability and models navigation. The risk is long chains that hide failures, so keep chains to a single journey and use clear method names that show which page you end on.
22
What are JMeter listeners and why should you avoid most of them during a load run?
Listeners collect and display results, such as View Results Tree, Summary Report and Aggregate Report. Visual listeners keep every sample in memory and redraw graphs, which consumes a lot of CPU and RAM and can make JMeter itself the bottleneck. During real load runs disable them, run in non-GUI mode, write raw results to a JTL file and generate the HTML dashboard afterwards. Use View Results Tree only for debugging.
23
How do you include and exclude groups in testng.xml?
Inside a <test>, add <groups><run><include name="smoke"/><exclude name="broken"/></run></groups>. Only methods in the included groups run, minus excluded ones. Configuration methods must have alwaysRun = true or belong to the groups, or they will be skipped. You can also pass -Dgroups=smoke from Maven Surefire for CI selection.
24
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.
25
How do you attach a screenshot to the Cucumber report when a scenario fails?
Situation: a new project team asked whether to keep Selenium or switch tools. Task: recommend an option with evidence. Action: I ran a two-week proof of concept automating the same five flows in both, compared stability, run time, team skills and Grid support, and shared the results. Result: we kept Selenium with Java for the existing team skills and Grid setup, and adopted better waits and parallel runs from the trial.
Grid 4 is split into the Router, which receives all requests, the Distributor, which assigns new sessions to nodes, the Session Map, which records which node owns each session, the New Session Queue, which holds requests waiting for a free slot, the Event Bus, which lets components communicate, and Nodes, which run the browsers. In standalone or hub mode these run in one process, but they can also be deployed separately to scale.
29
Write Java code to count the occurrences of each character in a string.
String parent = driver.getWindowHandle();
for (String h : driver.getWindowHandles())
if (!h.equals(parent)) driver.switchTo().window(h);
// ...then switch back to parent
31
What is the difference between == and equals() in Java?
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.
33
How do you share state between step definition classes in Cucumber Java?
Use dependency injection. With cucumber-picocontainer (or Spring/Guice), create a context class such as TestContext holding the driver, page objects and scenario data, and add it as a constructor parameter in every step class. Cucumber creates one instance per scenario and injects the same object everywhere, so state is shared within a scenario but never leaks between scenarios. Avoid static fields because they break parallel runs.
A quality gate is a rule a build must pass before moving forward, such as all smoke tests passing, code coverage above a threshold, no critical static analysis issues, or no new high-severity vulnerabilities. If the gate fails, the pipeline stops and the change is not deployed. Gates make quality an automatic decision instead of a manual check.
35
What are Cucumber Expressions and how do they differ from regular expressions?
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.
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.
39
An API returns a list in random order and your assertion on the first element fails intermittently. How do you fix it?
Do not assert on positions when the API does not guarantee order. Use order-independent Hamcrest matchers such as hasItem, hasItems or containsInAnyOrder on the extracted field, for example body("name", hasItems("Pen", "Book")). Or use GPath filtering like find { it.id == 42 } to pick the right item before checking its fields. If order matters for the feature, raise it as a requirement and request a sort parameter.
40
What is serialization and deserialization in REST Assured?
Serialization converts a Java object (POJO) into JSON for the request body; deserialization converts the response JSON back into a Java object. REST Assured does this automatically when Jackson or Gson is on the classpath: body(userPojo) serializes and response.as(User.class) deserializes. Using POJOs gives type safety, IDE support and cleaner assertions compared with hand-written JSON strings.
Tips to crack the Ericsson Automation Testing interview
Revise computer networks, TCP/IP, and basics of mobile communication such as LTE and 5G architecture before interviews.
Practise programming in C, C++, Java or Python, and be ready to solve simple coding and debugging problems.
Learn about Ericsson's role in 5G rollouts in India to discuss the industry and your interest in telecom.
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; Ericsson interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Ericsson Automation Testing interview?
Candidates usually go through 4 stages: Online assessment (aptitude + technical); 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 Ericsson Automation Testing interview?
This practice set leans on Cucumber and BDD (6), REST Assured (6), Selenium WebDriver (5), TestNG Framework (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Ericsson interviewers ask you to walk through real work.
Are these the exact questions asked at Ericsson?
No. These are curated practice questions that match the skills and difficulty usually tested in telecom interviews like Ericsson's. They are not a leaked or verified list of past questions.
Where does Ericsson hire Automation Testing professionals in India?
Ericsson has large teams in Gurugram, Bengaluru, Chennai, Noida, Kolkata. Openings and locations change often, so check the Ericsson careers page and filter by city and experience.
Automation Testing questions for similar companies