TCS
40+ Star World Research Interview Questions and Answers
Q1. How to capture screenshot?
Screenshots can be captured using built-in tools or third-party software.
On Windows, use the Snipping Tool or press Windows key + Print Screen
On Mac, press Command + Shift + 4
Third-party software like Greenshot or Lightshot can also be used
Screenshots can be saved as image files or copied to clipboard
Q2. What is method overloading and overriding?with example
Method overloading and overriding are two concepts in object-oriented programming that allow methods to have multiple implementations.
Method overloading is when a class has multiple methods with the same name but different parameters.
Method overriding is when a subclass provides a different implementation of a method that is already defined in its superclass.
Example of method overloading: public void print(int num) and public void print(String str)
Example of method overriding...read more
Q3. What are the concepts of Object-Oriented Programming (OOP) in Java?
OOP in Java is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.
Encapsulation: Bundling data (fields) and methods (procedures) that operate on the data into a single unit (object).
Inheritance: Allows a class to inherit properties and behavior from another class.
Polymorphism: The ability of different classes to be treated as instances of the same class through a common interface.
Abstraction:...read more
Q4. What is the importance of TestNg.xml file?
TestNg.xml file is important for configuring and executing TestNG tests.
TestNg.xml file allows us to configure test suites, test cases, and test data.
It helps in grouping and prioritizing tests, setting up dependencies, and parallel execution.
We can also specify test parameters, listeners, and reporting options in the TestNg.xml file.
Example:
Example:
Example:
Q5. Difference between Implicit wait and Explicit wait?
Implicit wait is a global wait applied to all elements, while explicit wait is a wait applied to a specific element.
Implicit wait is set once and applied to all elements in the script
Explicit wait is set for a specific element and waits for a certain condition to be met
Implicit wait is set using the 'driver.manage().timeouts().implicitlyWait()' method
Explicit wait is set using the 'WebDriverWait' class and 'ExpectedConditions' class
Example of implicit wait: driver.manage().ti...read more
Q6. What is software development life cycle
Software development life cycle is a process followed by software development teams to design, develop and maintain software.
SDLC is a structured approach to software development
It consists of several phases such as planning, analysis, design, implementation, testing, deployment, and maintenance
Each phase has its own set of activities and deliverables
It helps to ensure that the software is developed efficiently, on time, and within budget
Examples of SDLC models include Waterf...read more
Q7. Difference between relative xpath and absolute xpath
Relative xpath is a path that starts from the node of the current element, while absolute xpath starts from the root node.
Relative xpath is shorter and more flexible than absolute xpath.
Relative xpath is recommended when the structure of the page is likely to change.
Absolute xpath is more specific and less prone to errors.
Absolute xpath is recommended when the structure of the page is unlikely to change.
Example of relative xpath: //div[@class='container']/ul/li
Example of abso...read more
Q8. What is Method Overloading and Overriding?
Method overloading is having multiple methods in the same class with the same name but different parameters. Method overriding is having a method in a subclass with the same name and parameters as a method in the superclass.
Method overloading allows a class to have multiple methods with the same name but different parameters.
Method overriding occurs when a subclass provides a specific implementation of a method that is already provided by its superclass.
Example of method over...read more
Q9. What is TesNG? annotations of TestNg?
TestNG is a testing framework for Java that supports various annotations to define test methods and their behavior.
TestNG is used for unit, functional, and integration testing
Annotations like @Test, @BeforeTest, @AfterTest, etc. are used to define test methods and their behavior
TestNG allows grouping of test methods and prioritizing their execution
TestNG also supports data-driven testing and parallel test execution
Example: @Test annotation is used to mark a method as a test m...read more
Q10. Difference between find elements and find element?
find elements returns a list of web elements matching the locator, while find element returns the first web element matching the locator.
find elements returns a list of web elements, find element returns the first web element
find elements is used when multiple elements need to be located, find element is used when only one element is needed
find elements is useful for handling multiple elements like a list of links, find element is useful for unique elements like a submit butt...read more
Q11. What is verification and validation
Verification ensures that the product is built according to the requirements, while validation ensures that the product meets the customer's needs.
Verification checks if the product is being built correctly
Validation checks if the right product is being built
Verification is done during development
Validation is done after development
Examples: Unit testing, code reviews, walkthroughs for verification; User acceptance testing, system testing, regression testing for validation
Q12. What is re-testing and how to use
Re-testing is the process of testing a previously failed test case after the defects have been fixed.
Re-testing is done to ensure that the defects have been fixed and the system is working as expected.
It is important to document the results of re-testing to ensure that the defects have been resolved.
Re-testing can be done manually or through automation tools.
Examples of re-testing include testing a login functionality after fixing a defect related to incorrect password valida...read more
Q13. Define constructor? constructor overloading?
Constructor is a special method that is used to initialize objects. Constructor overloading is having multiple constructors with different parameters.
Constructor is called when an object is created
It has the same name as the class
It can have parameters
Constructor overloading is having multiple constructors with different parameters
Example: public class Person { public Person() {} public Person(String name) {} }
Q14. What is JVM, JDK and JRE?
JVM is Java Virtual Machine, JDK is Java Development Kit, and JRE is Java Runtime Environment.
JVM is an abstract machine that provides a runtime environment in which Java bytecode can be executed.
JDK is a software development kit used to develop Java applications.
JRE is a software package that contains what is needed to run a Java program, including the JVM.
Q15. What is waterfall model
Waterfall model is a linear sequential approach to software development.
It follows a sequential process where each phase must be completed before moving on to the next.
It is a rigid model and changes cannot be made easily once a phase is completed.
It is suitable for projects with well-defined requirements and a stable scope.
Examples of industries that use this model are construction and manufacturing.
Phases include requirements gathering, design, implementation, testing, depl...read more
Q16. What is Regration testing
Regression testing is a type of software testing that ensures changes made to the software do not affect its existing functionality.
It involves retesting the previously tested functionalities
It is done to ensure that new changes do not break the existing code
It helps in identifying and fixing defects early on
Examples include smoke testing, sanity testing, and full regression testing
Q17. How do you apply SQL for ur project
SQL is used for data retrieval, manipulation and management in the project.
SQL queries are used to retrieve data from databases
SQL is used to manipulate data in databases
SQL is used to manage databases
Examples include retrieving user information from a database, updating user information, and creating new tables in a database
Q18. How to write listeners and use of it
Listeners in test automation are used to capture and log events during test execution.
Listeners are interfaces that collect and display information about test execution.
They can be used to generate logs, reports, and screenshots during test runs.
Common listeners in test automation frameworks include TestNG listeners and JUnit listeners.
Q19. The framework used for the automation testing
The framework used for automation testing is Selenium WebDriver.
Selenium WebDriver is a popular automation testing framework used for web applications.
It supports multiple programming languages like Java, Python, C#, etc.
Selenium WebDriver allows testers to automate web browsers for testing purposes.
It provides a rich set of APIs for interacting with web elements and performing actions.
Test scripts can be written to perform automated tests on web applications using Selenium W...read more
Q20. 1) Explain the functionality of linked list.
A linked list is a data structure where each element points to the next element in the sequence.
Consists of nodes where each node contains data and a reference to the next node
Can easily insert or delete elements without shifting other elements
Types include singly linked list, doubly linked list, and circular linked list
Example: Singly linked list: 1 -> 2 -> 3 -> 4
Q21. What is Jenkins?
Jenkins is an open-source automation server that helps to automate parts of the software development process.
Jenkins allows for continuous integration and continuous delivery (CI/CD) of software projects.
It can be used to build, test, and deploy software automatically.
Jenkins has a large number of plugins available to extend its functionality.
Examples of plugins include ones for integrating with version control systems like Git or SVN, or for sending notifications to team mem...read more
Q22. Why did you choose TCS?
I chose TCS because of its reputation for providing excellent training, career growth opportunities, and a diverse range of projects.
Reputation for providing excellent training programs
Opportunities for career growth and advancement
Diverse range of projects to work on
Q23. What do you know about scrum
Scrum is an agile framework for managing work on complex projects.
Scrum involves breaking down work into small, manageable tasks called user stories.
It emphasizes frequent communication and collaboration among team members.
Scrum uses time-boxed iterations called sprints to deliver working software.
Roles in Scrum include Product Owner, Scrum Master, and Development Team.
Scrum ceremonies include Sprint Planning, Daily Standups, Sprint Review, and Sprint Retrospective.
Q24. What is POM?
POM stands for Page Object Model. It is a design pattern used in test automation to create object repositories for web UI elements.
POM separates the UI elements and the test code, making the code more maintainable and reusable.
Each web page is represented by a separate class in POM.
POM helps in reducing code duplication and improves test script maintenance.
POM is widely used in Selenium WebDriver test automation.
Example: LoginPage.java, HomePage.java, etc. are classes represe...read more
Q25. How to calculate age using sql
To calculate age using SQL, subtract the birthdate from the current date.
Use DATEDIFF function to calculate the difference between birthdate and current date.
Divide the result by 365 to get the age in years.
Consider leap years for more accurate calculation.
Q26. What's is software testing
Software testing is the process of evaluating a software application or system to find defects and ensure it meets the specified requirements.
Testing is done to identify defects or bugs in the software
It ensures that the software meets the specified requirements
It helps in improving the quality of the software
Testing can be done manually or using automated tools
Types of testing include functional, performance, security, and usability testing
Q27. Process involved in STLC process
STLC process involves planning, designing, executing, and reporting on software testing activities.
1. Planning phase involves defining test objectives, scope, and resources.
2. Design phase includes creating test cases, test data, and test environment setup.
3. Execution phase is where tests are run, defects are logged, and progress is monitored.
4. Reporting phase involves analyzing test results, preparing test reports, and making recommendations.
5. Each phase is iterative and ...read more
Q28. what is expected package
The expected package for a Test Engineer varies depending on factors such as experience, location, and company size.
Expected package can range from entry-level salaries to six-figure salaries for experienced professionals.
Factors influencing package include years of experience, specialized skills, industry demand, and company budget.
Location plays a significant role in determining salary, with higher cost of living areas typically offering higher salaries.
Company size can als...read more
Q29. Explain java collection framework
Java Collection Framework is a set of classes and interfaces that provide various data structures and algorithms to store and manipulate collections of objects.
It provides interfaces like List, Set, Map, Queue, etc. for different types of collections.
Classes like ArrayList, LinkedList, HashSet, HashMap, PriorityQueue, etc. implement these interfaces.
It includes algorithms like sorting, searching, and manipulation of collections.
Collections framework enhances the reusability a...read more
Q30. Explain testing procedure
Testing procedure involves planning, designing, executing, and evaluating tests to ensure software quality.
1. Planning phase involves defining test objectives, scope, and resources.
2. Design phase includes creating test cases, test data, and test environment setup.
3. Execution phase involves running tests, recording results, and reporting defects.
4. Evaluation phase includes analyzing test results, identifying trends, and improving testing process.
5. Types of testing procedur...read more
Q31. Javascript example programs
Javascript example programs showcase the use of Javascript in various scenarios.
Basic Hello World program
Program to calculate factorial of a number
Program to reverse a string
Program to check if a number is prime
Q32. Describe Piller of oop?
The pillars of OOP (Object-Oriented Programming) are encapsulation, inheritance, and polymorphism.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class).
Inheritance: Ability to create new classes based on existing classes, inheriting their attributes and methods.
Polymorphism: Ability for objects of different classes to respond to the same message in different ways.
Q33. Explain your Framework
My framework is a data-driven automation framework using Selenium and TestNG.
Utilizes Selenium for web automation
Uses TestNG for test case management and execution
Supports data-driven testing with external data sources like Excel or CSV files
Q34. Explain java oops concept
Java OOPs concept refers to the Object-Oriented Programming principles in Java, including encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class).
Inheritance: Allows a class to inherit properties and behavior from another class.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the implementation details and showing only the necessary fe...read more
Q35. rate yourself in coding domain
I rate myself as proficient in coding domain.
Proficient in programming languages such as Java, Python, and C++
Strong understanding of data structures and algorithms
Experience in test automation using tools like Selenium or JUnit
Q36. oops concept with example
Oops concept refers to Object-Oriented Programming concepts like inheritance, polymorphism, encapsulation, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class. Example: Parent class 'Animal' and child class 'Dog'.
Polymorphism: Allows objects of different classes to be treated as objects of a common superclass. Example: 'Shape' superclass with 'Circle' and 'Square' subclasses.
Encapsulation: Bundling data and methods that operate on...read more
Q37. Define Oops concepts
Oops concepts are the principles of Object-Oriented Programming that help in creating modular, reusable, and maintainable code.
Encapsulation: Hiding the implementation details of an object from the outside world
Inheritance: Creating new classes from existing ones, inheriting their properties and methods
Polymorphism: Ability of objects to take on multiple forms or behaviors
Abstraction: Focusing on the essential features of an object and ignoring the non-essential ones
Q38. While, do-while loop
The do-while loop is a control flow statement that executes a block of code at least once before checking the condition.
The do-while loop is similar to the while loop, but the condition is checked after the block of code is executed.
The code block will always execute at least once, even if the condition is false.
Example: do { // code block } while (condition);
Q39. Switch case function
Switch case function is used to execute different code blocks based on different conditions.
Switch case is a control structure in programming languages.
It evaluates an expression and executes the corresponding case.
Each case is followed by a break statement to exit the switch block.
Default case is executed if no other cases match the expression.
Example: switch(expression) { case value1: // code block break; case value2: // code block break; default: // code block }
Q40. Type of joins in SQL
Types of joins in SQL include inner join, outer join, left join, right join, and full join.
Inner join: returns rows when there is a match in both tables
Outer join: returns all rows from one table and only matching rows from the other table
Left join: returns all rows from the left table and the matched rows from the right table
Right join: returns all rows from the right table and the matched rows from the left table
Full join: returns rows when there is a match in one of the ta...read more
More about working at TCS
Top HR Questions asked in Star World Research
Interview Process at Star World Research
Top Test Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month