Senior Test Engineer
30+ Senior Test Engineer Interview Questions and Answers for Freshers
Q1. How can a circuler cake can be cut into 8 equal pieces with 3 cuts only?
A circular cake can be cut into 8 equal pieces with 3 cuts only by cutting the cake into quarters and then making a diagonal cut.
Cut the cake into quarters with two cuts, creating four equal pieces.
Make a diagonal cut from the center of the cake to the edge, dividing each quarter into two equal pieces.
This will result in eight equal pieces of cake with only three cuts.
Q2. 1)Difference between findelement and find elements 2)Type of exception, name few in java and selenium.3) oops concept
Answering questions related to Selenium and Java for Senior Test Engineer position.
findelement returns the first matching element on the page while find elements returns a list of all matching elements
Some exceptions in Java and Selenium are NullPointerException, NoSuchElementException, TimeoutException, ElementNotVisibleException
Object-Oriented Programming (OOP) concepts include inheritance, encapsulation, abstraction, and polymorphism
Q3. What is the explanation of Object-Oriented Programming (OOP) concepts, and which OOP concepts are utilized in your project?
OOP is a programming paradigm based on the concept of objects, which can contain data and code to manipulate that data.
Encapsulation: bundling data and methods that operate on the data into a single unit (object)
Inheritance: allows a class to inherit properties and behavior from another class
Polymorphism: ability for objects to be treated as instances of their parent class or their own class
Abstraction: hiding the complex implementation details and showing only the necessary ...read more
Q4. What are agile methodologies and what are the key agile ceremonies?
Agile methodologies are iterative approaches to software development that prioritize flexibility and collaboration.
Agile methodologies involve breaking down projects into smaller, manageable tasks called user stories.
Key agile ceremonies include daily stand-up meetings, sprint planning meetings, sprint reviews, and sprint retrospectives.
Daily stand-up meetings are brief check-ins where team members discuss what they worked on yesterday, what they plan to work on today, and an...read more
Q5. What are TestNG annotations, and can you explain the TestNG framework?
TestNG annotations are used to control the flow of test methods and provide additional information about the test methods.
TestNG annotations are used to mark methods as test methods, setup methods, teardown methods, etc.
Examples of TestNG annotations include @Test, @BeforeMethod, @AfterMethod, @BeforeClass, @AfterClass, @BeforeSuite, @AfterSuite, etc.
TestNG framework is a testing framework inspired by JUnit and NUnit, but introduces some new functionalities like grouping, par...read more
Q6. What are the XPaths used to locate elements on a website?
XPaths are used to locate elements on a website by defining the path of the element in the HTML structure.
XPaths can be used to locate elements based on their attributes, such as id, class, name, etc.
Absolute XPaths start with a single forward slash (/) and specify the complete path from the root element.
Relative XPaths start with a double forward slash (//) and specify the path from the current node.
Example: //input[@id='username'] - locates an input element with id 'usernam...read more
Share interview questions and help millions of jobseekers 🌟
Q7. What defect tracking tools have you used in your project?
I have used Jira, Bugzilla, and HP Quality Center for defect tracking in my projects.
Jira
Bugzilla
HP Quality Center
Q8. What Selenium exceptions have you encountered in your experience?
I have encountered exceptions like NoSuchElementException, ElementNotVisibleException, TimeoutException, StaleElementReferenceException, and InvalidSelectorException.
NoSuchElementException occurs when an element could not be found in the DOM.
ElementNotVisibleException is thrown when an element is present in the DOM but not visible on the page.
TimeoutException is raised when a command does not complete in the specified time.
StaleElementReferenceException occurs when the elemen...read more
Senior Test Engineer Jobs
Q9. What is the difference between API and WebService. Oops concepts
API is a set of protocols and tools for building software applications. WebService is a type of API that uses XML to exchange data over the internet.
API stands for Application Programming Interface
API is a set of protocols and tools for building software applications
WebService is a type of API that uses XML to exchange data over the internet
WebService is a software system designed to support interoperable machine-to-machine interaction over a network
APIs can be used to access...read more
Q10. What is TestNG, Difference between WebElement and WebElements, fially and final, types of Exceptions in selenium, how to handel frams
TestNG is a testing framework for Java. WebElement represents a single element on a web page, while WebElements represents a collection of elements. 'finally' is a keyword used in exception handling. There are different types of exceptions in Selenium. To handle frames in Selenium, we can use the switchTo() method.
TestNG is a testing framework for Java
WebElement represents a single element on a web page
WebElements represents a collection of elements
'finally' is a keyword used...read more
Q11. What are the Java oops concepts used in selenium.
Java oops concepts used in Selenium include inheritance, polymorphism, encapsulation, and abstraction.
Inheritance is used to create child classes that inherit properties and methods from parent classes.
Polymorphism allows objects to take on multiple forms and perform different actions based on the context.
Encapsulation is used to hide implementation details and protect data from external interference.
Abstraction is used to simplify complex systems by breaking them down into s...read more
Q12. What are the alternatives for java collections in some other programming languages
Some alternatives for Java collections in other programming languages include Python's lists, C++'s vectors, and JavaScript's arrays.
Python: lists
C++: vectors
JavaScript: arrays
Q13. What frameworks have you used in your projects?
I have used frameworks such as Selenium, JUnit, TestNG, and Cucumber in my projects.
Selenium
JUnit
TestNG
Cucumber
Q14. Write a program to check if a string is a palindrome or not.
Program to check if a string is a palindrome or not.
Create a function that takes a string as input
Remove all non-alphanumeric characters and convert to lowercase
Compare the string with its reverse to check if it's a palindrome
Q15. Do you know anything about capital market
Yes, capital market refers to the financial market where long-term securities such as stocks and bonds are traded.
Capital market is a market for long-term securities such as stocks and bonds
It is a platform for companies to raise funds for their business operations
Investors can buy and sell securities in the capital market
Examples of capital markets include the New York Stock Exchange and NASDAQ
Q16. how will you handle windows handling in real time ?
I will handle windows handling in real time by using automation tools and scripts to interact with windows and perform necessary actions.
Utilize automation tools like Selenium or Appium to interact with windows
Write scripts to automate window handling tasks
Use APIs provided by the operating system to manipulate windows
Monitor window events and respond accordingly in real time
Q17. Selenium Webdriver based methods and uses in your Automation framework.
Selenium Webdriver is a tool used for automating web applications. It provides methods to interact with web elements.
Selenium Webdriver is used to automate web applications by interacting with web elements such as buttons, text boxes, etc.
It provides methods to locate elements on a web page using various locators like ID, class name, CSS selector, etc.
Once the element is located, actions can be performed on it like clicking, typing, selecting, etc.
Selenium Webdriver can also ...read more
Q18. How to run cucumber framework parallelly
Cucumber framework can be run parallelly using tools like TestNG or JUnit.
Use TestNG or JUnit to run cucumber tests in parallel
Configure test runners to run tests in parallel
Use Maven or Gradle to manage dependencies and run tests
Q19. Reverse the string and find occurance of character in java
To reverse a string and find the occurrence of a character in Java.
Use StringBuilder to reverse the string.
Use a loop to iterate through the string and count the occurrences of the character.
Use the charAt() method to access individual characters in the string.
Q20. Why string is immutable Explain Pom Difference between implicit and explicit wait
Strings are immutable in Java because they are stored in the String pool and any modification creates a new string object.
String objects are stored in the String pool to save memory
Any modification to a string creates a new string object
Example: String str = "hello"; str.concat("world"); will create a new string object with "helloworld"
Q21. Difference between implicit and explicit wait in selenium
Implicit wait is set globally for all elements, while explicit wait is applied to specific elements only.
Implicit wait is set using 'driver.manage().timeouts().implicitlyWait()' method
Explicit wait is implemented using WebDriverWait class with ExpectedConditions
Implicit wait is applied globally for all elements, while explicit wait is applied to specific elements only
Implicit wait is used to wait for elements to load before performing actions, while explicit wait is used to w...read more
Q22. Throw and throws difference
Throw and throws are keywords in Java used for exception handling. Throw is used to throw an exception while throws is used to declare an exception.
Throw is used to explicitly throw an exception in a method.
Throws is used to declare the exceptions that a method may throw.
Throw is followed by an instance of an exception class.
Throws is followed by the name of the exception class or classes separated by commas.
Throw is used within a method while throws is used in the method sig...read more
Q23. Core java and collections in java
Core Java is the foundation of Java programming language, while collections in Java are data structures used to store and manipulate groups of objects.
Core Java includes concepts like OOP, inheritance, polymorphism, and exception handling.
Collections in Java provide interfaces like List, Set, and Map for storing and manipulating data.
Examples of collections in Java include ArrayList, HashSet, and HashMap.
Q24. What is ipo, CA, PA, CE PE
IPO stands for Input-Process-Output, CA for Corrective Action, PA for Preventive Action, CE for Conformance Evaluation and PE for Process Evaluation.
IPO is a testing technique that involves testing inputs, processing them and verifying the output.
CA is a process of identifying and correcting the root cause of a problem.
PA is a process of identifying and preventing potential problems before they occur.
CE is a process of evaluating whether a product or service meets the require...read more
Q25. Find xpath of flipkart product price
To find the xpath of Flipkart product price, inspect the element and use the browser's developer tools.
Open the Flipkart website and navigate to the product page
Right-click on the price element and select 'Inspect' or press F12
In the developer tools, locate the price element in the HTML code
Right-click on the element in the HTML code and select 'Copy XPath'
The XPath of the price element will be copied to your clipboard
Q26. Explain oops concept in Java
OOPs is a programming paradigm based on the concept of objects that interact with each other.
OOPs stands for Object-Oriented Programming.
It focuses on creating reusable code and reducing complexity.
It involves four main concepts: encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation is the process of hiding implementation details from the user.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows objects to take ...read more
Q27. Write screenshot script in selenium
To take a screenshot in Selenium, use the getScreenshotAs method
Create a WebDriver instance
Use the getScreenshotAs method to capture the screenshot
Save the screenshot to a file using File class
Q28. Lambda features in java 8
Lambda expressions in Java 8 provide a concise way to represent anonymous functions.
Lambda expressions are used to provide implementation of functional interfaces.
They enable functional programming in Java by treating functionality as a method argument.
Syntax of lambda expressions is (argument) -> (body).
Example: (int a, int b) -> a + b
Q29. Opps concept and its pillar
Object-oriented programming paradigm and its four pillars: Inheritance, Encapsulation, Abstraction, Polymorphism
Inheritance: Allows a class to inherit properties and behavior from another class
Encapsulation: Bundling data and methods that operate on the data into a single unit
Abstraction: Hiding the complex implementation details and showing only the necessary features
Polymorphism: Ability to present the same interface for different data types
Q30. Write getter an setter method
Getter and setter methods are used to access and modify the values of private variables in a class.
Create a method with the prefix 'get' followed by the variable name to retrieve its value.
Create a method with the prefix 'set' followed by the variable name to set its value.
Ensure the getter method returns the value of the variable and the setter method updates the variable with the passed value.
Q31. Explain about agile methodologies
Agile methodologies are iterative approaches to software development that prioritize flexibility, collaboration, and customer feedback.
Agile methodologies involve breaking down projects into smaller, manageable tasks called sprints
They emphasize continuous collaboration between cross-functional teams
Customer feedback is incorporated throughout the development process to ensure the final product meets user needs
Popular agile frameworks include Scrum, Kanban, and Extreme Progra...read more
Q32. Testing types and technology
Testing types include functional, non-functional, manual, automated, regression, performance, and security testing.
Functional testing ensures that the software functions correctly according to the requirements.
Non-functional testing focuses on aspects like performance, usability, and security.
Manual testing involves testers executing test cases manually without automation tools.
Automated testing uses tools to automate the execution of test cases.
Regression testing checks if n...read more
Q33. Waits in selenium
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);
Q34. Encapsulation in java
Encapsulation is the concept of bundling data and methods that operate on the data into a single unit, preventing direct access to the data from outside the unit.
Encapsulation helps in data hiding and abstraction
It allows for better control over data access and modification
Access to the data is restricted to methods within the class
Getters and setters are commonly used to access and modify encapsulated data
Q35. Write test cases
Test cases for a login page
Verify successful login with valid credentials
Verify error message is displayed for invalid credentials
Verify password is hidden while typing
Verify 'forgot password' link redirects to correct page
Interview Questions of Similar Designations
Top Interview Questions for Senior Test Engineer Related Skills
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month