i
Tech Mahindra
Filter interviews by
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
I applied via Job Portal and was interviewed in Apr 2024. There was 1 interview round.
I have worked on a project to automate testing processes using various tools and frameworks.
Implemented automation scripts using Selenium WebDriver for web application testing
Utilized TestNG framework for test case management and execution
Integrated Jenkins for continuous integration and deployment
Used Page Object Model design pattern for better code maintenance
Performed API testing using tools like Postman
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'
What people are saying about Tech Mahindra
I applied via Naukri.com and was interviewed in Dec 2023. There was 1 interview round.
Tech Mahindra interview questions for designations
I applied via Walk-in and was interviewed in Jan 2023. There were 3 interview rounds.
Get interview-ready with Top Tech Mahindra Interview Questions
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...
I was interviewed in Feb 2022.
Sprint retrospective is a meeting held at the end of a sprint to review the team's performance and identify areas for improvement.
It is a time-boxed meeting
It is attended by the entire team including the product owner and scrum master
The team discusses what went well, what didn't go well, and what can be improved in the next sprint
Action items are identified and assigned to team members for follow-up
The goal is to cont...
Sprint backlog is a prioritized list of tasks to be completed during a sprint.
It is created during sprint planning
It contains user stories, bugs, and technical tasks
It is updated daily during the sprint
It helps the team to stay focused on the sprint goal
It is owned by the development team
I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.
Absolute Xpath starts from the root element, while relative Xpath starts from any node in the DOM structure.
Absolute Xpath starts with a single forward slash (/) and starts selection from the root node.
Relative Xpath starts with a double forward slash (//) and starts selection from the current node or any node in the DOM structure.
Absolute Xpath is more brittle and prone to breaking if the structure of the page changes...
The return would be the number of tabs open in the browser.
The return value would be an integer representing the count of open tabs.
For example, if there are 5 tabs open, the return value would be 5.
Types of waits in Selenium include Implicit Wait, Explicit Wait, and Fluent Wait.
Implicit Wait: Waits for a certain amount of time before throwing a NoSuchElementException.
Explicit Wait: Waits for a certain condition to occur before proceeding further in the code.
Fluent Wait: Waits for a condition to be true with a defined polling frequency.
Example: driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
Exceptions in Selenium are errors that occur during test execution, disrupting the flow of the test script.
Exceptions are thrown when there is an unexpected behavior in the application under test or in the test script itself.
Common exceptions in Selenium include NoSuchElementException, ElementNotVisibleException, TimeoutException, and StaleElementReferenceException.
Handling exceptions in Selenium can be done using try-...
Feature files contain high-level description of the functionality to be tested, while step definitions are the implementation of the steps in the feature file using code.
Feature files are written in Gherkin syntax and describe the behavior of the application in plain text.
Step definitions are written in programming languages like Java, Ruby, etc., and map the steps in the feature file to automation code.
Feature files a...
Data can be input in Cucumber using feature files and step definitions.
Data can be input in feature files using scenarios and scenario outlines
Step definitions can be used to define the actions to be taken with the input data
Data tables can be used in feature files to input structured data
Examples keyword can be used in scenario outlines to provide multiple sets of input data
Test case is a set of conditions or variables under which a tester will determine whether a system under test satisfies requirements. Test plan is a document outlining the scope, approach, resources, and schedule of testing activities. Test scenarios are detailed descriptions of possible interactions with the system.
Test case: specific conditions to be tested, expected results, steps to execute
Test plan: overall strate...
Hooks in Java are methods that allow subclasses to override or extend the behavior of a superclass.
Hooks are commonly used in frameworks like JUnit and TestNG for test automation.
They are often used for setup and teardown operations before and after test methods.
Examples include @Before, @After, @BeforeClass, and @AfterClass annotations in JUnit.
I applied via Naukri.com and was interviewed in Sep 2024. There was 1 interview round.
A constructor is a special type of method in a class that is automatically called when an object of that class is created.
Constructors have the same name as the class they belong to
They are used to initialize the object's state or perform any necessary setup
Constructors can have parameters to customize the initialization process
Example: public class Car { public Car(String color) { this.color = color; } }
Yes, a static method can be overridden in Java using the concept of method hiding.
In Java, static methods cannot be overridden in the traditional sense like instance methods.
When a subclass defines a static method with the same signature as a static method in the superclass, it is called method hiding.
Method hiding does not follow polymorphism and is resolved at compile time based on the reference type.
Example: class...
Yes, a static local variable can be created inside a static method.
Yes, a static local variable can be declared inside a static method in programming languages like C++.
Static local variables retain their values between function calls.
Example: static void myStaticMethod() { static int count = 0; count++; }
String memory allocation is dynamic and depends on the length of the string.
String memory allocation is dynamic and can change based on the length of the string.
In Java, a String object is stored in the heap memory.
Each character in a String typically takes up 2 bytes of memory.
String objects in Java are immutable, meaning once a String object is created, it cannot be changed.
Yes, you can create a static method inside an abstract class or interface.
Static methods can be defined in interfaces since Java 8.
Static methods in interfaces are used for providing utility methods that are not tied to any specific instance of the interface.
Static methods in abstract classes can be used for common functionality that does not require an instance of the class.
The parent class of Java is the Object class.
All classes in Java are directly or indirectly derived from the Object class.
The Object class is the root class in Java's class hierarchy.
It provides methods that are common to all objects in Java, such as toString(), equals(), and hashCode().
Window Handles in Selenium are unique identifiers used to handle multiple browser windows in a Selenium test script.
Window Handles are unique alphanumeric strings assigned to each browser window opened by Selenium.
They are used to switch between different browser windows during a test script execution.
Window Handles can be obtained using getWindowHandles() method in Selenium.
Example: Set
Some of the top questions asked at the Tech Mahindra Automation Test Engineer interview -
based on 5 interviews
1 Interview rounds
based on 29 reviews
Rating in categories
Software Engineer
26.4k
salaries
| ₹2 L/yr - ₹9.2 L/yr |
Senior Software Engineer
21.4k
salaries
| ₹5.5 L/yr - ₹23 L/yr |
Technical Lead
11.7k
salaries
| ₹9.5 L/yr - ₹38 L/yr |
Associate Software Engineer
5.5k
salaries
| ₹1.8 L/yr - ₹8.2 L/yr |
Team Lead
5k
salaries
| ₹5.2 L/yr - ₹17 L/yr |
Infosys
Cognizant
Accenture
Wipro