0% found this document useful (0 votes)
3 views7 pages

Test - Interview QA

The document contains a series of interview questions and answers related to software testing, automation testing, and Java programming. It covers topics such as test case prioritization, Selenium usage, performance testing, locators in Selenium, and the principles of object-oriented programming. Additionally, it includes practical coding examples and explanations of various testing methodologies and tools.

Uploaded by

sandy.honi07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

Test - Interview QA

The document contains a series of interview questions and answers related to software testing, automation testing, and Java programming. It covers topics such as test case prioritization, Selenium usage, performance testing, locators in Selenium, and the principles of object-oriented programming. Additionally, it includes practical coding examples and explanations of various testing methodologies and tools.

Uploaded by

sandy.honi07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

1. How do you prioritize test cases?

2. Can you write a sample code to find duplicates in an array?

3. Explain the difference between an interface and an abstract class in Java.

4. How do you perform cross-browser testing?

5. Describe a situation where you had to use exploratory testing.

6. What is automation testing and why is it important?

7. How do you handle incomplete or ambiguous requirements?

8. Can you explain regression testing and why it's important?

9. What are some challenges you have faced in your projects and how did you overcome them?

10. What is your experience with Selenium and TestNG?

11. What are the differences between functional and non-functional testing?

12. What are the different types of testing you have performed?

13. How do you ensure test coverage?

14. How do you ensure the quality of software applications?

15. What is the use of @BeforeTest annotation in TestNG?

16. Explain your experience with version control tools like Git.

17. Can you explain the Software Testing Life Cycle (STLC)?

18. What is Functional Testing?

19. What is the purpose of a traceability matrix?

20. What is compatibility testing?

21. What is the difference between verification and validation?

22. Explain your current project and your role in it.

23. How do you update your technical knowledge?

24. Which automation tools have you used, and what are their advantages?

25. How do you handle dependency test cases in TestNG?


1st Round:

1. Tell me about yourself.

2. What are the various selenium components, and which components are you using?

3. How do you inspect elements?

4. What are the various locators you are using in your day-to-day life?

5. Write syntax for XPath?

6. Write a syntax to initialize the webdriver.

7. Explain absolute and relative XPath with an example

8. Explain your project and framework

9. How do you get the data from the Excel sheet?

10. Where do you use java in selenium webdriver?

11. What is oops?

12. Explain the abstraction concept with an example.

13. Explain the inheritance concept with an example.

14. Explain method overloading and Method overriding with an example.

15. What is an interface? Explain with an example.

16. Write a basic selenium script.

17. Explain the defect life cycle.

18. Write a syntax to select a value from the drop-down.

19. Write syntax to get the text from the table.

20. What are Hashmap and HashSet? Explain?

21. Where do you use Hashmap?

22. What is the exception you get in selenium?

23. What is implicitly wait, explicitly wait, webdriver wait, Thread.sleep

24. Write syntax for the webdriver wait.

25. The difference between implicitly, explicitly, webdriver wait and thread.sleep.

26. Which framework are you using in your project?

27. Are you using any integration tools?

28. What is Jenkins?


29. Where do you upload test results?

30. What are retesting and regression testing?

31. What is smoke testing?

32. How do you get to know if the developer has fixed the issues or not?

33. What are the roles and responsibilities?

34. Which java & selenium versions are you using?

35. How do you handle if XPath is changing dynamically?

36. Have you ever written test cases in your projects?

37. They asked Some selenium questions.

2nd round:

1. Tell me about yourself.

2. What is performance testing? (I have mentioned this in my resume)

3. For which functionality module have you performed performance testing in your project?

4. What is the response time?

5. Which language do you use for Appium testing? (I have mentioned this in my resume)

6. Did you write test scripts for mobile automation?

7. Can we use the same code in the Appium, the test script developed for a web app?

8. What is Jenkins?

9. What is the layout of Jenkins?

10. What is GIT & SVN?

11. Difference between GIT & SVN

12. Does Jenkins require a local system for CI?

13. They also asked some basic java questions


Locators:

1. " Can we have multiple HTML elements on a web page? "

I said , yes ofcourse a web page can have multiple HTML elements.

2. " How would you identify a particular HTML element on a web page? "

I said, there is a mechanism in Selenium called " Locators ". With the help of Locators , we can identify a
particular HTML element on a page.

3. " How many locators do we have in Selenium? "

I said, we have total 8 Locators in Selenium.

4. " Please, Tell me the name of all the 8 Locators? "

I said, id, name, className, tagName, linkText, partialLinkText, xpath and cssSelector.

5. " Which 'Locator' would you give first preference to find a particular HTML element on a web page? "

I said, i will give first preference to "id" Locator.

6. " Why would you like to use "id" instead any other locators? "

I said, "id" is unique and fast.

7. " When you have only choice of two locators (name, className) to use so which one would be using
to find a particular HTML element on a web page ? ".
I said, "name" i will give second preference to "name" Locator.

8. " Why not className instead name?"

I said , As class represents group of elements if we have a requirement to catch multiple HTML elements
associated with the class then we would use.

9. " Is there any specific locator to locate link text? "

I said, yes we have two locators to work with link text : linkText & partialLinkText.

11. " Can't we use xpath/cssSelector to locate link text? "

I said, yes we can but i won't be using because xpath/cssSelector is a customized way and customized
things always slowdown the process and when i have some specialized locators for linked text that
would be more compatible and will fast the script comparitively.

8. "Sometimes, you may not have any of these [ id, name, className, linkText, partialLinkText] locators
in your HTML so which locator would be using to identify a particular HTML element on a web page? "

I said, i would be using xpath/cssSelector (customized mechanism) when we don't have any one on one
locator in our HTML.

9. " If you are using xpath/cssSelector Sometimes, you will have some attribute value is too long or
sometime few part may be dynamic in some attribute values so don't you think that our code will look
so complex/lengthy ? "

I said, again we have a mechanism " Regular expressions " so syntactically we will make it short and
simple using xpath / cssSelector with regular expressions.
10. " Sometimes, you have only tags in your HTML then how would you identify a particular HTML
element on a webpage? "

I said, i would be solving this scenario with the help of tags.

Conclusion: Interviewer will check our smartness how smartly we are using Locators, how smartly we
are writing locators and we should study deep-dive this concept and implementation.

What is Encapsulation in java ? *

Encapsulation is one of the fundamental principle of object oriented programming .

📍 Encapsulation allows to protect the data within a class from outside entities.

📍 Encapsulation helps to achieve hiding the internal information from outside entities.

📍 Data and methods (To access the data) are bundled together within a single unit .(class)

📍 In Java, encapsulation is typically achieved by:

Declaring the class members as private.

Providing public getter and setter methods to access and modify the private attributes.

Note :

Let's say we have 1 private variables in a class

Example - 1:

getter & setter for primitive type private members.

private String empnm;

// get method to access the data

public String GetName() {

return empnm;

// set the data

public void setName(String enm) {


this.empnm = enm;

} // call the method & pass the data as param

If we can notice the getter & setter for empnm , below points we can note:

1. getter method will return the variable which is private and it is non parameterized .

2. setter method is a parameterized method which we shall use to set the value for the private member
while calling , so only it is parameterized method.

Example -2 :getter & Setter for the private array :

public int[] getarr() {

return arr;

// Setter method to modify the private array

public void setarr(int[] brr) {

// You can add validation or other logic if needed

this.arr = brr;

You might also like