Testing - Interview Questions and Answers for 'Testing' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Testing - Interview Questions and Answers for 'Testing' - 42 question(s) found - Order By Rating

next 30
 Q1. Can we pass the junit test if the tested method throws the exception ? and Should we do that ?Junit
Ans. Yes, We can pass the test even if the tested method throws an exception.

One way is know as exception testing in which the tested method is expected to throw exception and hence the expectation is set accordingly.

@Test(expected = IndexOutOfBoundsException.class)
public void test(){}

Other way is to just ignore if the tested code throws an exception. In that case , we can enclose the tested method call in the try block and within exception block, we just return gracefully.

Exception testing is perfectly ok to be done as we would like test code in case an exception occurs and if the code is handling the exception properly. Ignoring the exception by putting the tested method call within try block isn't something normal and should be avoided.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Junit exception testing


 Q2. Can we mock private methods ?PowerMock
Ans. Yes, using Power Mock.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     mockito  mocking  testing


 Q3. What is stress testing ?Testing
Ans. Stress testing is a software testing activity that determines the robustness of software by testing beyond the limits of normal operation.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q4. If you are asked to test an application without any documentation, What type of testing will you do ?Testing
Ans. White Box Testing
Unit Testing
Ad Hoc Testing

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q5. How would you test a Twitter application ? Testing
 This question was recently asked at 'Slalom'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     solution  testing     Asked in 1 Companies


 Q6. What is a difference between JUnit 3 and 4 ?Junit
 This question was recently asked at 'Conde Nast'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     testing  junit     Asked in 1 Companies


 Q7. can we write multiple CATCH in webdriver code?Testing
Ans. A try block can be followed by one or more catch blocks. Each catch block must contain a different exception handler. So, if you have to perform different tasks at the occurrence of different exceptions, use java multi-catch block.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     webdriver     Asked in 1 Companies


 Q8. How to work with dynamic webtable ?Testing
Ans. List lists=driver.FindElements(xpath);
int row= lists.size();

List lists=driver.FindElements(xpath);
int column= lists.size();

String value=Rowtable.FindElement(xpath);
system.out.println(value);

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Selenium     Asked in 1 Companies


 Q9. what is the testcase techniqueTesting
 This question was recently asked at 'HCL Technologies'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q10. Does it make sense to mock integration calls during stress / load test ?Testing
Ans. No, its usually not done.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     integration testing  stress testing  mocking  Mockito


 Q11. What is the sequence in which you write different types of autmated test cases ?Testing
Ans. Junits or Unit Tests
Integration Tests
End to End Automation if required
Stress / Load Tests if required

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q12. What is the sequence in which you write different types of autmated test cases ?Testing
Ans. Junits or Unit Tests
Integration Tests
End to End Automation if required

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q13. What is doCallRealMethod() method used for ?PowerMock
Ans. When we Mock an object and then make a reference to any method using mocked object reference , java never makes a call to that method and looks for mocked value to be returned or null if none specified. But If we want that to be overridden and want java to make actual method call upon using mocked object reference, this method can be used.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     junit  mocking  java unit testing  Mockito


 Q14. Have you ever heard of the term "dry run" ? What does it mean ?Testing
Ans. It means that the run is just for testing purpose.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     dry run


 Q15. Please explain with example different types of testing ?Testing
Ans. Unit Testing ( Junits )
Integration Testing ( Testing overall flow by calling the entry method or by calling the service end point )
Manual Testing ( End to End Manual User Testing, they way eventually it will be used by end users )
Automation Testing ( Machine replication of end to end testing )

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve           basic        frequent


 Q16. Have you ever built an automation suite to test a cron job or command line application ?Testing
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     automation testing


 Q17. What does @VisibleForTesting annotation denotes ?Testing
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     VisibleForTesting


 Q18. How to capture Screenshot when the testcases are failed?Testing
Ans. Using Listeners

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     testng  selenium     Asked in 1 Companies


 Q19. Difference between emulator and simulator.Testing
 This question was recently asked at 'Hughes Systique'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q20. How do you use Mock frmaework to test webservices in any of your previous project ?Testing
Ans. We were having client methods to call web services and were mocking the client method call using Mockito.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     mocking  testing  mockito


 Q21. Can we mock static methods ?Testing
Ans. Yes we can use PowerMock. With Mockito , we cannot mock static methods.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     mocking fraeworks  mocking static methods  mockito


 Q22. Can and Should we mock calls in integration tests ?Testing
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q23. Which type of testing involves use of mocking frameworks ?Testing
Ans. Unit Testing

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q24. What could be the Use Cases for an Elevator system ?Testing
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     use cases  testing


 Q25. What is a Webdriver ?Testing
Ans. Selenium WebDriver is a tool for automating web application testing.It helps in replicating the manual tester behavior like keyboard entry, mouse events etc and then matching the output against the expected.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     selenium  webdriver     Asked in 37 Companies


 Q26. Have you ever tried mocking static methods ?Testing
Ans. Yes, that can be done using Power Mock. Mockito doesnt provide a way to mock static methods.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Mockito  junit  powermock     Asked in 1 Companies


 Q27. Write a Test Case using Mock ?Testing
Ans. http://javasearch.buggybread.com/CodeSnippets/searchCodeSamples.php?keyword=mock&category=code

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Junit  Mock     Asked in 1 Companies


 Q28. What are the phases in Software Testing process ?Process
Ans. Test Planning -> Test Design -> Test Execution -> Evaluating Exit Criteria and Closure

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     testing   testing phases   process


 Q29. What is assert keyword used for ?
Ans. The assert keyword is used to make an assertion—a statement which the programmer believes is always true at that point in the program. This keyword is intended to aid in testing and debugging.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   junit.assert   testing   white box testing


 Q30. Which load testing tools have you used ?
Ans. Rational Robot, JMeter, LoadRunner

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     testing   load testing   rational robot   jmeter   loadrunner   software tester      basic        rare


next 30

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: