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 Newest

next 30
 Q1. Which of the following is not the advantage of Mocking frameworks ?

a. It helps testing the module independently
b. It helps in faster unit testing
c. It helps in testing code even when external dependencies like service calls are not working
d. It helps in doing end to end Integration Testing
Ans. It helps in doing end to end Integration Testing

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

   Like         Discuss         Correct / Improve     mocking frameworks   mockito   unit testing   junits


 Q2. How should we ignore or avoid executing set of tests ?
Ans. We can remove @Test from the respective test so as to avoid its execution. Alternatively we can put @Ignore annotation on the Junit file if we want to ignore all tests in a particular file.

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

   Like         Discuss         Correct / Improve     junit   @test   @ignore   unit tests   unit testing   testing


 Q3. How can we test methods individually which are not visible or declared private ?
Ans. We can either increase their visibility and mark them with annotation @VisibleForTesting or can use reflection to individually test those methods.

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

   Like         Discuss         Correct / Improve     junit   reflection api   @visiblefortesting   white box tester


 Q4. What are the steps to be performed while coding Junit with Mocking framework ?JUnit
Ans. Initialize required objects for working with mocks and tested method
Set the mock behaviour on dependent objects
Execute the tested method
Perform assertions
Verify if a method is invoked or not

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

   Like         Discuss         Correct / Improve     junit   mocking frameworks   mock   unit testing   java   white box testing  Mockito


 Q5. How to access a Web Element if there are many elements with the same XPath ?
Ans. By specifying the Index like

//button[@class='button'])[2]

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

   Like         Discuss         Correct / Improve     selenium   selenium webdriver   automation testing


 Q6. 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


 Q7. 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


 Q8. 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


 Q9. What are use cases?Process
Ans. It is part of the analysis of a program and describes a situation that a program might encounter and what behavior the program should exhibit in that circumstance.

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

   Like         Discuss         Correct / Improve     use cases   design   high level design   testing   test driven development   software system analyst   project lead      basic        frequent


 Q10. Difference between Assert and Verify ?Testing
Ans. Assert works only if assertions ( -ea ) are enabled which is not required for Verify.Assert throws an exception and hence doesn't continue with the test if assert evaluates to false whereas it's not so with Verify.

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

   Like         Discuss         Correct / Improve     assert   junit   mockito   verify   testing   unit testing     Asked in 5 Companies


 Q11. Name few Java Mocking frameworks ?
Ans. Mockito, PowerMock, EasyMock, JMock, JMockit

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

   Like         Discuss         Correct / Improve     junit   mocking frameworks   mock   architecture   white box testing


 Q12. How to perform a clean install without executing Tests ?Maven
Ans. mvn clean install -Dmaven.test.skip=true

or

mvn install -DskipTests

or


org.apache.maven.plugins
maven-surefire-plugin

true



within parent POM file.

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

   Like         Discuss         Correct / Improve     maven   maven install   unit testing   unit tests


 Q13. Which of the following annotation is used to avoid executing Junits ?

a. @explicit
b. @ignore
c. @avoid
d. @NoTest
Ans. @ignore

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

   Like         Discuss         Correct / Improve     java   testing   junit   unit testing


 Q14. Which of the following are usually manual ?

a. Unit Test
b. Integration Test
c. Load Test
d. Both a and c
Ans. Integration Test

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

   Like         Discuss         Correct / Improve     testing   manual testing   automated testing


 Q15. Which of the following nearly involves same Test execution plan ?

a. Unit and Integration tests
b. Unit and Regression Tests
c. Integration and Performance Tests
d. Performance and Load Tests
Ans. Performance and Load Tests

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

   Like         Discuss         Correct / Improve     testing


 Q16. 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


 Q17. 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


 Q18. 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


 Q19. 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


 Q20. 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     


 Q21. 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     


 Q22. 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


 Q23. 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


 Q24. 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


 Q25. 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


 Q26. 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


 Q27. 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


 Q28. 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


 Q29. 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


 Q30. 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


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: