Skip to content

Sonata Software Automation Testing Interview Questions & Answers

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

About Sonata Software hiring for Automation Testing roles

Sonata Software is an Indian IT services company known for its work on Microsoft technologies, cloud modernisation and digital platforms. It serves clients in retail, travel, distribution, banking and healthcare with application development, Dynamics 365, data and testing services. In India it hires developers, testers, data engineers and functional consultants, and is a long-standing Microsoft partner for enterprise solutions.

For Automation Testing roles, this Sonata Software practice set focuses most on Core Java for Testers (10), Selenium WebDriver (7), Selenium Grid & Docker (5), Appium Mobile Automation (4). It has 23 easy, 17 medium questions, so you can start easy and work up to the harder ones.

Company type
IT services
Headquarters
Bengaluru, India
Main India offices
Bengaluru, Hyderabad

Sonata Software Automation Testing interview process

  1. Online assessment (aptitude + technical MCQs)
  2. Technical interview
  3. Managerial round
  4. HR round

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

Solved for Sonata SoftwareStart 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

Write a step definition that reads a DataTable as a list of maps.

Save to ▾
Show answer
// Given the following users exist @Given("the following users exist") public void usersExist(DataTable table) { List<Map<String, String>> rows = table.asMaps(); for (Map<String, String> row : rows) { userApi.create(row.get("name"), row.get("role")); } }
02

How do you handle a browser basic authentication pop-up in Selenium?

Save to ▾
Show answer
The basic auth dialog is not part of the page, so findElement cannot reach it. The simplest way is putting credentials in the URL, like https://user:pass@site.test, which works in many browsers. In Selenium 4 with Chromium you can register credentials through the HasAuthentication interface: ((HasAuthentication) driver).register(UsernameAndPassword.of("user", "pass")). Keep the credentials in environment variables or a secret store, never in code.
03

What are appPackage and appActivity in Android automation?

Save to ▾
Show answer
appPackage is the unique application id of an Android app, such as com.example.shop, and appActivity is the activity screen that Appium launches first, such as .MainActivity. Together they let Appium start an app that is already installed without passing the apk path. You can find them with adb shell dumpsys window or by reading the manifest. A wrong activity name is a common reason a session fails to start.
04

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.
05

Your API tests started failing with SSL handshake errors on a new test server. What do you do?

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

What is a step definition in Cucumber?

Save to ▾
Show answer
A step definition is a Java method annotated with @Given, @When or @Then whose expression matches a Gherkin step. When Cucumber runs a feature, it finds the matching method and executes it, passing captured parameters as arguments. Keep step definitions thin: they should call page objects or API helpers rather than contain Selenium code directly, so the same steps stay reusable across many features.
07

Which locator strategies does Appium support and which should you prefer?

Save to ▾
Show answer
Appium supports accessibility id, id (resource-id on Android), class name, XPath, Android UiAutomator selectors, iOS predicate strings and iOS class chains. Prefer accessibility id because it is fast, works across Android and iOS and also improves app accessibility. Next use resource-id or iOS predicates. Use XPath only as a last resort because it walks the whole UI tree and is slow and brittle, especially on iOS.
08

Where do you use OOP concepts in your framework?

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

Which reporting tools do you use?

Save to ▾
Show answer
TestNG reports, ExtentReports and Allure give charts, screenshots and logs that are easy to share with the team.
10

Write a Dockerfile that runs a Maven and TestNG test suite.

Save to ▾
Show answer
FROM maven:3.9-eclipse-temurin-21 WORKDIR /app # cache dependencies first for faster rebuilds COPY pom.xml . RUN mvn -q dependency:go-offline COPY src ./src COPY testng.xml . ENV GRID_URL=http://selenium-hub:4444 CMD ["sh", "-c", "mvn test -Dgrid.url=$GRID_URL -Dsurefire.suiteXmlFiles=testng.xml"]
11

Tell me about a time you set up test infrastructure that other teams started using.

Save to ▾
Show answer
Situation: three product teams each kept their own unstable Grid VMs. Task: provide one reliable shared Grid. Action: I set up a Docker-based Grid with pinned images, health checks, video for failures and a short onboarding guide, then ran a pilot with one team and fixed their issues before opening it up. Result: all three teams moved within a quarter, VM costs dropped and Grid-related failures fell sharply.
12

Reverse a string in Java.

Save to ▾
Show answer
String r = new StringBuilder(s).reverse().toString(); // or loop from the last index and append each character
13

What is the difference between == and equals() in Java?

Save to ▾
Show answer
== compares references (or primitive values); equals() compares content when overridden, as in String.
14

What is the LoadableComponent pattern in Selenium?

Save to ▾
Show answer
LoadableComponent is a Selenium support class that standardises how a page object ensures it is loaded. You extend it and implement load(), which navigates to the page, and isLoaded(), which throws an Error if the page is not ready. Calling get() checks isLoaded and calls load only if needed, then checks again. It gives a consistent, self-verifying way to open pages and fails fast with a clear message.
15

What are JMeter listeners and why should you avoid most of them during a load run?

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

What is Selenium Grid and why use it?

Save to ▾
Show answer
It runs tests in parallel across multiple machines and browsers using a hub and nodes, cutting execution time and increasing browser coverage.
17

Difference between an abstract class and an interface?

Save to ▾
Show answer
An abstract class can hold state and concrete methods; an interface defines a contract (with default methods since Java 8). A class extends one abstract class but can implement many interfaces.
18

What is the difference between noReset and fullReset in Appium?

Save to ▾
Show answer
By default Appium clears app data between sessions but keeps the app installed. noReset set to true keeps app data and login state, which speeds up tests but can leak state between them. fullReset set to true uninstalls and reinstalls the app, giving the cleanest state but adding time. A common approach is noReset for fast suites with explicit cleanup in the test, and fullReset only for first-launch or onboarding scenarios.
19

What is Gherkin and what are its main keywords?

Save to ▾
Show answer
Gherkin is the plain-English language Cucumber uses to describe behaviour. Main keywords are Feature, Scenario, Given (precondition), When (action), Then (expected outcome), And/But (continuation), Background (common steps), Scenario Outline with Examples (data-driven), and Rule (groups scenarios under one business rule). Because it is readable by business analysts and testers alike, the feature file becomes living documentation as well as an executable test.
20

Implicit vs explicit vs fluent wait?

Save to ▾
Show answer
Implicit wait applies globally to element lookups. Explicit wait waits for a specific condition (WebDriverWait + ExpectedConditions). Fluent wait is an explicit wait with custom polling and ignored exceptions.
21

What is the difference between extract().response() and extract().path()?

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

What is the difference between a page object and a utility class in a test framework?

Save to ▾
Show answer
A page object models one screen or component: its locators and the user actions possible there, such as LoginPage.loginAs. A utility class holds generic helpers not tied to any page, such as reading config, generating test data, date formatting or taking screenshots. Mixing them makes page objects bloated and utilities dependent on the UI. Keep page objects in a pages package and helpers in a utils package.
23

Difference between absolute and relative XPath?

Save to ▾
Show answer
Absolute starts from the root (/html/...) and breaks easily; relative starts anywhere with // and is more stable, for example //input[@id='email'].
24

What is API testing and why is it done before UI testing?

Save to ▾
Show answer
API testing checks the business logic layer directly by sending requests and validating responses, status codes, data and errors. It is faster, more stable and cheaper to maintain than UI tests, and it can start as soon as endpoints exist, before the UI is ready. Most functional rules should be covered at API level, leaving UI tests for key user journeys.
25

Tell me about a time you had to explain a technical test failure to a non-technical manager.

Save to ▾
Show answer
Situation: a release was blocked by failing tests and the manager wanted to know if it was safe to ship. Task: explain the risk without jargon. Action: I separated the failures into one real bug, where customers could be charged twice, and three environment issues. I showed the bug with a short screen recording. Result: the manager delayed the release by one day, the bug was fixed and the environment issues were assigned to DevOps.
26

What is performance testing and what are its main types?

Save to ▾
Show answer
Performance testing checks how fast, stable and scalable a system is under a given workload. Load testing measures behaviour at expected traffic. Stress testing pushes beyond capacity to find the breaking point and how the system recovers. Spike testing applies sudden jumps in users. Soak or endurance testing runs normal load for hours to find leaks. Scalability testing checks whether adding resources increases capacity as expected.
27

findElement vs findElements?

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

What is the Maven Failsafe plugin and how is it different from Surefire?

Save to ▾
Show answer
Surefire runs unit tests in the test phase and stops the build as soon as tests fail. Failsafe runs integration tests in the integration-test phase and checks results later in the verify phase, so post-integration-test steps, like stopping a server or Docker containers, still run after failures. By default Failsafe picks classes named *IT. Many teams run UI and API suites through Failsafe with mvn verify for that reason.
29

What is the use of the this and super keywords?

Save to ▾
Show answer
this refers to the current object; super refers to the parent class, used to call parent constructors and methods.
30

Describe a time you automated a manual build or release step for the QA team.

Save to ▾
Show answer
Situation: before each regression a tester spent an hour deploying the build to QA and seeding data by hand. Task: remove that manual step. Action: I wrote a Jenkins pipeline stage that deployed the build, ran database seed scripts and a smoke check, then triggered the regression job, and documented it for the team. Result: setup dropped to ten minutes without human effort, and regressions could run overnight automatically.
31

What is RemoteWebDriver and how is it different from ChromeDriver?

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

A cookie consent banner appears randomly and blocks clicks in your Selenium tests. How do you handle it?

Save to ▾
Show answer
The most stable fix is preventing it: set the consent cookie before the test with driver.manage().addCookie after opening the domain, or ask developers for a test flag that disables the banner. If it must be handled in the UI, write one helper that checks for the banner with a short wait using findElements and closes it if present. Call it from the BasePage after navigation, not scattered in tests.
33

What is the difference between a Docker image and a container?

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

How do you check that the Grid is ready before starting the tests in CI?

Save to ▾
Show answer
Poll the Grid status endpoint, http://hub:4444/status, until the JSON field value.ready is true, which means at least one node has registered. In a shell step you can loop with curl and jq, for example until curl -s http://localhost:4444/status | jq -e '.value.ready'; do sleep 2; done, with an overall timeout. In Compose you can add a healthcheck on the hub. Without this, the first tests fail while nodes are still starting.
35

Write Java code to count the occurrences of each character in a string.

Save to ▾
Show answer
String s = "automation"; Map<Character, Integer> counts = new LinkedHashMap<>(); for (char c : s.toCharArray()) { counts.put(c, counts.getOrDefault(c, 0) + 1); } System.out.println(counts); // a=2, u=1, t=2, o=2, m=1, i=1, n=1
36

What are Appium capabilities and which ones are essential to start a session?

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

What are stubs, mocks, fakes and spies in testing?

Save to ▾
Show answer
They are test doubles that replace real dependencies. A stub returns fixed answers, such as a fake API returning a canned user. A mock also verifies how it was called, like checking a payment service received one charge. A fake is a lightweight working version, such as an in-memory database. A spy wraps a real object and records calls. Automation testers often use WireMock stubs to isolate tests from unstable services.
38

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.
39

What are Java 8 streams and lambdas?

Save to ▾
Show answer
Lambdas are short anonymous functions; streams process collections declaratively with filter, map and collect, for example filtering link text from a list of elements.
40

Write an XPath for a button with the text "Login".

Save to ▾
Show answer
//button[normalize-space()='Login'] //button[contains(text(),'Login')]

Tips to crack the Sonata Software Automation Testing interview

  • Brush up on C# or Java, SQL and basic cloud concepts, especially Microsoft Azure, since much of the work uses Microsoft stacks.
  • Prepare clear examples of debugging, writing test cases or building small applications from your projects or internships.
  • Read about Sonata's Microsoft partnership and platform modernisation focus so you can explain why the company fits your goals.
  • 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; Sonata Software interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Sonata Software Automation Testing interview?

Candidates usually go through 4 stages: Online assessment (aptitude + technical MCQs); 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 Sonata Software Automation Testing interview?

This practice set leans on Core Java for Testers (10), Selenium WebDriver (7), Selenium Grid & Docker (5), Appium Mobile Automation (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Sonata Software interviewers ask you to walk through real work.

Are these the exact questions asked at Sonata Software?

No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Sonata Software's. They are not a leaked or verified list of past questions.

Where does Sonata Software hire Automation Testing professionals in India?

Sonata Software has large teams in Bengaluru, Hyderabad. Openings and locations change often, so check the Sonata Software careers page and filter by city and experience.

Automation Testing questions for similar companies