I had compiled this page to include the questions over following topics
- Core - Java
- Java Collection
- Java Programs
- Selenium WebDriver
- Junit
- TestNG
- REST API
- GIT
- Cucumber
- Types of polymorphism
- Difference between override and overload
- Methods that cannot be overloaded
- Static block and instance block
- Difference in Static and non static
- Encapsulation and common use cases
- Abstract vs interfaces
- Inheritance in java
- Methods that cannot be overloaded
- Type casting in java
- String buffer and string builder
- Why string is immutable in java
- How to handle exceptions
- Can I write try catch without the catch block
- Difference between throws and throw
- Use of iterator in java
- Difference in Final, finally and finalize
- Boxing and unboxing in java
- Increment and decrement operation
- Variable Args
- This and super keyword in java
- Issues during Swtich case without break
- Upcasting and downcasting
- Baseclass of all class in java
- Baseclass of error and exceptions
- Access specifiers
- Continue and break statement
- Can main method return any value
- Can we overload main method. What happens when overloaded 30.how to execute and statement before main method
- Difference between == and equals()
- Can user declare constructor as final
- Can we cast any other type to Boolean data with type casting. 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
- Can we create object of abstract class
- Can we create reference for an abstract class
- Can we declare a class as static
- What is instanceOf keyword
- What's the load factor of HashMap
- How to prevent a class from being sub classes
- Final variable, final method and final class
- Ways to create a string variable.
- What is gc() - garbage collector
- Subclass and innerclass
- Infinite loop in java
- How to make copy of an element
- Checked and unchecked exceptions
- Classes inside List interface, Set interface, Map Interface
- Arraylist vs Linkedlist
- Arraylist vs array
- Arraylist vs vector or stack
- Which class of List Interface to be used if user have more insertions and deletions
- Which class of List Interface to be used if user have more retrieval
- Set Interface: HashSet, TreeSet, SortedSet
- Map - HashMap, HashTable, TreeMap, LinkedHashMap.
- Stack and Queue
- How to maintain insertion order in Set, List and Map
- How to sort elements in ascending order in Set and Map
- String reverse
- String Palindrome
- String Anagram
- Find occurrences of characters in a string
- Find the count of Capital and Small letters in a string
- Remove duplicate characters from string
- Swap to numbers without temporary variable
- Reverse number
- factorial
- Fibonacci
- Count number, alphabet and special characters
- Difference in driver.get() and driver.navigate().to()
- Navigation methods in selenium
- What is POM
- Implicit wait
- Explicit wait- use of explicit wait, how to ignore exceptions using explicit wait
- Fluent wait
- Examples for expected conditions in explicit wait
- Default timeout of pageLoadTimeout.
- Use of desired capabilities
- Use of chromeOptions, firefoxOptions ,ieOptions, etc.
- How to disable notification in selenium.
- Difference between getText() and getAttribute()
- How to extract css property value
- Difference between driver.close() and driver.quit()
- How to handle dropdown elements with select tag and without select tag.
- How to handle frames and windows
- How to switch back to the parent window.
- How to perform page scroll in selenium
- Use of Robot keys
- Use of AutoIt
- Use of Sikuli
- How to perform File Upload
- How to click or send value to an element without using element.click() and element.sendKeys()
- Relative and absolute xpath
- Explain few Xpath functions
- How to login to site showing authentication popup in selenium
- Mention few selenium exceptions
- Difference between single slash and double slash.
- What are the scenarios that cannot be automated using selenium.
- How to perform right click on selenium
- Action class and it's methods
- Use of HtmlUnit driver
- Can we create an object of the WebDriver() in selenium?
- What is stale element exception and how to handle it.
- Xpath and CSS selector
- Explain what JUnit is?
- Mention what is the difference between JUnit and TestNG?
- Mention different methods of exception handling in JUnit?
- Explain who should use JUnit – a developer or tester? Why do you use JUnit to test your code?
- What are the important JUnit annotations?
- What are the features of JUnit?
- What are the useful JUnit extensions?
- Explain what is Unit Test Case?
- Explain how you can write a simple JUnit test case?
- Explain what is meant by ignoring test in JUnit?
- What are the top advantages of writing unit tests?
- Annotations in testng
- Difference between @BeforeTest and @BeforeMethod
- Soft assert vs Hard Assert
- How to pass parameters to test methods
- Use of data provider
- Use of invocationCount, enabled, priority, dependsOnMethod, dependsOnGroups, alwaysRun, dataProvider, groups, timeout, expectedExceptions, singleThreaded, etc
- testNg xml structure
- How to group testcases
- Use of IRetryAnalyzer class
- How to run failed testcases
- How to perform parallel testing.
- What level user can perform parallel testing
- Use of ISuiteListener Methods
- Use of TestListenerAdaptor methods
- How to ignore packages and classes.
- Can user provide negative value for setting priority.
- Client/server Error Codes
- Success codes
- Use of GET, PUT, POST, PATCH, DELETE
- Difference between Put and Patch
- Difference between Put and Post
- How to handle authentication
- Difference between webserver and API
- Json/xml structure format
- How to validate json response
- Use of JsonPath
- How to construct json body for Put, Post, Patch request.
- Use of JsonObject.
- What's is URI
- What's a resource
- What are the common headers used.
- Common content types
- Use of common commands used: add, status, commit, push, pull, restore, checkout, clone
- How to handle merge conflicts
- How merge issues occur.
- keywords used inside CucumberOptions
- Difference between DryRun and Strict in cucumberOptions
- And/OR operation in Tags
- Annotations in Cucumber
- Use of order function inside cucumber annotations
- Use of background keyword
- Keywords used in cucumber
- How to perform single line and multiline comment in cucumber
- How data is passed in cucumber
- Use of ScenarioOutline and example
- What is dataTable
- Can user provide multiple examples for one scenario outline