Common Test Automation Interview Questions
Java-Basic
2. Difference between override and overload
3. Methods that cannot be overloaded
4. Static block and instance block
5. Difference in Static and non-static
6. Encapsulation and common use cases
7. Abstract vs interfaces
8. Inheritance in java
9. Methods that cannot be overloaded
10. Typecasting in java
11. String buffer and string builder
12. Why string is immutable in java
13. How to handle exceptions
14. Can I write try-catch without the catch block
15. Difference between throws and throw
16. Use of iterator in java
17. Difference in Final, finally and finalize
18. Boxing and unboxing in java
19. Increment and decrement operation
20. Variable Args
21. This and super keyword in java
22. Issues during Switch case without a break
23. Upcasting and downcasting
24. Base class of all classes in java
25. Baseclass of error and exceptions
26. Access specifiers
27. Continue and break statement
28. Can the main method return any value
29. Can we overload the main method. What happens when overloaded
30. How to execute and statement before the main method
31. Difference between == and equals()
32. Can user declare constructor as final
33. Can we cast any other type to Boolean data with typecasting.
34. Does java compile if user use 'static public void' instead of 'public static void'
35. Can we use this() and super() in a constructor
36. Can we create an object of abstract class
37. Can we create a reference for an abstract class
38. Can we declare a class as static
39. What is an instance Of keyword
40. What's the load factor of HashMap
41. How to prevent a class from being subclasses
42. Final variable, final method, and final class
43. Ways to create a string variable.
44. What is GC() - garbage collector
45. Subclass and inner class
46. Infinite loop in java
47. How to make a copy of an element
48. Checked and unchecked exceptions
Java Collections
Java Programs
1. String reverse
2. String Palindrome
3. String Anagram
4. Find occurrences of characters in a string
5. Find the count of Capital and Small letters in a string
6. Remove duplicate characters from a string
7. Swap to numbers without a temporary variable
8. Reverse number
9. Factorial
10. Fibonacci
11. Count numbers, alphabet, and special characters
Selenium
2. Navigation methods in selenium
3. What is POM
4. Implicit wait
5. Explicit wait- use of explicit wait, how to ignore exceptions using explicit wait
6. Fluent wait
7. Examples for expected conditions in explicit wait
8. Default timeout of page load timeout.
9. Use of desired capabilities
10. Use of chrome options, firefoxOptions ,options, etc.
11. How to disable notification in selenium.
12. Difference between getText() and getAttribute()
13. How to extract CSS property value
14. Difference between driver.close() and driver.quit()
15. How to handle dropdown elements with a select tag and without a select tag.
16. How to handle frames and windows
17. How to switch back to the parent window.
18. How to perform page scroll in selenium
19. Use of Robot keys
20. Use of AutoIt
21. Use of Sikuli
22. How to perform File Upload
23. How to click or send value to an element without using an element. click() and element.sendkeys()
24. Relative and absolute XPath
TestNG
1. Annotations in TestNG2. Difference between @Before Test and @BeforeMethod
3. Soft assert vs Hard Assert
4. How to pass parameters to test methods
5. Use of data provider
6. Use of invocation Count, enabled, priority, depends on the method, dependsOnGroups, alwaysRun, dataProvider, groups, timeout, expected Exceptions, single-threaded, etc
7. TestNG XML structure
8. How to group test cases
9. Use of IRetryAnalyzer class
10. How to run failed test cases
11. How to perform parallel testing.
12. What level user can perform parallel testing
REST API
1. Client/server Error Codes
2. Success codes
3. Use of GET, PUT, POST, PATCH, DELETE
4. Difference between Put and Patch
5. Difference between Put and Post
6. How to handle authentication
7. Difference between webserver and API
8. JSON/XML structure format
9. How to validate JSON response
10. Use of JsonPath
11. How to construct JSON body for Put, Post, Patch request.
12. Use of JsonObject.
13. What's is URI
14. What's a resource
15. What are the common headers used.
16. Common content types
GIT
1. Use of common commands used: add, status, commit, push, pull, restore, checkout, clone
2. How to handle merge conflicts
3. How merge issues occur.
Cucumber
1. Keywords used inside CucumberOptions
2. Difference between DryRun and Strict in cucumberOptions
3. And/OR operation in Tags
4. Annotations in Cucumber
5. Use of order function inside cucumber annotations
6. Use of background keyword
7. Keywords used in cucumber
8. How to perform single-line and multiline comments in cucumber
9. How data is passed in cucumber
10. Use of ScenarioOutline and example
11. What is dataTable
12. Can the user provide multiple examples for one scenario outline
Hoping that the above-mentioned topics and questions will help you to clear your interviews.
All the best for your job hunt .... 👍
keep going
ReplyDelete