i
Tech Mahindra
Filter interviews by
Reverse a string in Java using StringBuilder or iterative approach.
Use StringBuilder's reverse() method to reverse the string.
Iterate through the string from end to start and build the reversed string.
Handle null or empty string cases.
Example: input 'hello' -> output 'olleh'
I applied via Walk-in and was interviewed in Jan 2023. There were 3 interview rounds.
I applied via Referral and was interviewed in Nov 2021. There was 1 interview round.
My framework is a hybrid framework that combines data-driven and keyword-driven approaches.
The framework uses Excel sheets to store test data and keywords.
It uses Selenium WebDriver for browser automation.
It has a modular structure with reusable functions and libraries.
It generates detailed HTML reports for test results.
It supports parallel execution of tests.
It has built-in exception handling and logging mechanisms.
Maven is a build automation tool used primarily for Java projects.
Maven uses a Project Object Model (POM) to manage dependencies and build process
It uses a central repository to download dependencies
Maven has a defined directory structure for projects
Plugins can be added to extend Maven's functionality
settings.xml is a configuration file used by Maven to customize its behavior.
It contains information about the local repository location, proxy settings, and server credentials.
It can be used to define profiles for different environments.
It is located in the .m2 directory in the user's home directory.
It can be overridden by using the -s or --settings command-line option.
To link TestNG file in Maven POM, add the TestNG dependency and plugin in POM.xml
Add TestNG dependency in POM.xml
Add TestNG plugin in POM.xml
Configure TestNG plugin to run the TestNG XML file
Example:
Select class in Selenium is used to handle dropdowns and multi-select options on a web page.
Syntax: Select select = new Select(driver.findElement(By.id("dropdownId")));
Methods: selectByVisibleText(), selectByValue(), selectByIndex(), getOptions(), isMultiple(), getAllSelectedOptions(), deselectAll(), deselectByVisibleText(), deselectByValue(), deselectByIndex()
Select class is used to handle dropdowns and multi-select o...
Jenkins is an open-source automation server used for continuous integration and delivery. It allows creating and managing jobs.
Jenkins is a popular tool for automating software development processes.
It provides a web-based interface for creating and managing jobs.
Jobs in Jenkins are used to define tasks and workflows for building, testing, and deploying software.
To create a job in Jenkins, navigate to the Jenkins dashb...
To point to any other branch in Jenkins, use the 'Branch specifier' field in the 'Source Code Management' section.
In the Jenkins job configuration, go to the 'Source Code Management' section
Select the appropriate SCM tool (e.g. Git, SVN)
In the 'Branch specifier' field, enter the name of the branch you want to point to (e.g. 'develop', 'feature/xyz')
Save the configuration and run the job
I don't have the available data to answer this question.
N/A
Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as if they were the same type.
Polymorphism is achieved through method overriding and method overloading
Example: A parent class Animal has a method called makeSound(). Child classes like Dog, Cat, and Cow can override this method to make their own unique sound.
Another example is method overloading where a...
Abstraction is a way of hiding implementation details. An interface is a contract that specifies the behavior of a class.
Abstraction is achieved through abstract classes and interfaces
Abstract classes can have both abstract and non-abstract methods
Interfaces can only have abstract methods and constants
A class can implement multiple interfaces but can only inherit from one abstract class
Abstract classes can have constru...
SQL query to delete duplicate records
Use the DELETE statement with a subquery to identify and delete duplicate records
The subquery should select the duplicate records based on the columns that define uniqueness
Use the ROW_NUMBER() function to assign a unique number to each row, and delete rows with a number greater than 1
SQL query to get the 10th highest salary from employee table
Use ORDER BY and LIMIT clauses
Subquery can be used to get the 10th highest salary
What people are saying about Tech Mahindra
I applied via Naukri.com and was interviewed before Mar 2023. There was 1 interview round.
Robot Framework is a generic open-source automation framework for acceptance testing and acceptance test-driven development (ATDD).
Robot Framework is a keyword-driven test automation framework that uses tabular test data syntax.
Challenges faced during testing include identifying and prioritizing test cases, handling dynamic elements, and maintaining test scripts.
Types of testing include functional testing, regression t...
Tech Mahindra interview questions for designations
I applied via Naukri.com and was interviewed in Aug 2020. There were 3 interview rounds.
I applied via Company Website and was interviewed before Feb 2020. There was 1 interview round.
I applied via Campus Placement and was interviewed in Oct 2020. There were 4 interview rounds.
Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Start from the first element and compare it with the next element
If the next element is smaller, swap them
Repeat this process for all elements in the array
Continue this process until no more swaps are needed
A program to print all prime numbers
Take input from user for range of numbers
Loop through the range and check if each number is prime
Print the prime numbers
Hashmap is a data structure that stores key-value pairs and allows constant time access to values based on their keys.
Hashmap uses a hash function to map keys to indices in an array.
Collisions can occur when multiple keys map to the same index, which can be resolved using techniques like chaining or open addressing.
Examples of hashmap implementations include Java's HashMap class and Python's dict type.
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows code reuse and promotes code organization.
The existing class is called the parent or superclass, and the new class is called the child or subclass.
The child class inherits all the properties and methods of the parent class and can also add new properties and methods.
For...
I applied via Walk-in and was interviewed in Mar 2021. There was 1 interview round.
I applied via Campus Placement and was interviewed before Dec 2021. There were 2 interview rounds.
Basic logical reasoning and verbal questions . Easy to clear
Some of the top questions asked at the Tech Mahindra Automation Test Engineer interview for experienced candidates -
based on 3 interviews
1 Interview rounds
based on 29 reviews
Rating in categories
Software Engineer
26.3k
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
21.4k
salaries
| ₹0 L/yr - ₹0 L/yr |
Technical Lead
11.7k
salaries
| ₹0 L/yr - ₹0 L/yr |
Associate Software Engineer
5.5k
salaries
| ₹0 L/yr - ₹0 L/yr |
Team Lead
5k
salaries
| ₹0 L/yr - ₹0 L/yr |
Infosys
Cognizant
Accenture
Wipro