Tuesday, 24 July 2018

Random Testing Interview Questions [Manual Testing &Selenium & Core Java ]

Below are the some of the testing interview questions frequently asked. I might have listed the solution for some and others are pretty straight forward.Google can help you!!


Ø  If a button is not present at the time of testing but it will come in future how will you test?
Ø  How to make finally block not to execute
Ø  Program to reverse a string
Ø  Check 2 strings eg: str1|A|B|C| & str2|C|A|B|
Ø  how to check str2 contains some alphabets as string1
Ø  Program for Bubble sort
Ø  What is Static variable? What is use of it?
Ø  What is the difference between overloading and overriding?
Ø  How do you stress test on windows media player? Give out two scenarios
Ø  explain junit
Ø  How to schedule jobs in Jenkins?
Ø  Explain Architecture of testng.
Ø  Explain implicit wait vs explicit wait
Ø  In which method you will define implicit wait in testng?
Ø  How to handle dynamic web tables in selenium?
Ø  How to capture a screenshot?
Sol: 
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
//The below method will save the screen shot in d drive with name "screenshot.png"
FileUtils.copyFile(scrFile, new File("D:\\screenshot.png"))

Ø  How to load/fetch keys value from properties file?
Ø  Find the second highest salary from employees table
Ø  How to connect DB to selenium
Ø  How to Handle alert box
Ø  How to handle window based pop ups
Ø  Program to reverse a string
Ø  Program to count the repeated words in a string
Ø  How to return a string from method?
Ø  Difference b/w absolute class and absolute methods
Ø  Program to print Duplicate numbers from array
Ø  Program to check whether string is palindrome or not
Ø  Difference b/w throw and throws
Ø  Define Abstraction
Ø  How to Connect to DB
Ø  Annotation in Testng and their order of execution
Ø  Difference between HSSf and XSSf
Ø  How to execute parallel test cases
Ø  Which locator is fastest in selenium Id?
Sol: 
1st css-2nd, xpath

Ø  What are different locators?
Ø  Define Properties of css
Ø  What is property file in java?
Ø  How to check whether text is underlined or not?
Ø  Can static method be overloaded and overridden?
Ø  What is final?
Ø  Can final method be overloaded and overridden?
Ø  In automation I am not able to click on element how do u handle which works fine when done manually?
Ø  How do you identify different exception in try catch?
Ø  Difference b/w string, string buffer, string builder
Ø  Program to print unique characters
Ø  What is stale exception?
Ø  How do you handle certificates?
Ø  What happens if we don’t have main in public static void main?


No comments:

Post a Comment