🧪 jUnit MCQ Quiz Hub

Junit Mcq Question Set 1

Choose a topic to test your knowledge and improve your jUnit skills

1. Which of the following is not correct about JUnit?




2. Which of the following is an example of a web controller?




3. Which of the following is not a mocking framework?




4. Which of the following is correct about Test Suite in JUnit?




5. Which of the following is also known as Beta Testing?




6. Which of the following is a free Java tool that calculates the percentage of code accessed by tests?




7. Which package contains interfaces that define jMock’s Domain Specific Embedded Language?




8. Class JUnitMatchers extends _________




9. Which of the following test has to be completed before integration testing?




10. Which of the following is the basic unit of development in Scrum?




11. Which of the following translates ExpectationErrors into JUnit AssertionFailedErrors?




12. Which of the following is a JUnit Rule that manages JMock expectations and allowances?




13. What is the full form of JJ in “JJ-path”?




14. Which of the following is a Java HTTP (Web) server and Java Servlet container?




15. Mocks are Trojan horses because they replace real ___________ from the inside, without the calling classes being aware of it.




16. Stubs usually provide high ______ in the tested system.




17. In which of the following test, Monkey Testing is also included in Android Studio as part of the standard testing tools.




18. Which testing is used for testing systems for which the specification takes in the form of rules or cause-effect combinations?




19. Which of the following rules helps to set up custom JUnit rules?




20. The JUnit hasItem() function is a ________




21. _______ is favoured over conditionals to better write testable code.




22. _______ is a programming practice that expects new code to be written only if an automated test has failed and also to eliminate duplication.




23. API stands for _________




24. When the _________ is used as the method’s first client, it becomes easier to focus purely on the API.




25. Eliminating duplication ensures that code is written that’s not only testable but also ______




26. _____ platform builds the application from its various components.




27. The ___________ platform is the last staging area before production.




28. On the development platform, _________ unit tests are executed.




29. The ______ exercises the application under load and verifies that it scales correctly.




30. User feedback is got from the ________




31. To get an expected test outcome a standard procedure is followed which is referred as _____




32. The test instantiates ___________ and calls methods on these _________




33. The test runs while a ___________ or EJB container hosts the application.




34. A layered application may have a front end to handle the presentation and a _______ to execute the business logic.




35. _______ tests examine the code at the boundary of its public API.




36. Developers often combine functional tests with __________ tests.




37. Layering provides _______ and the ability to access the back end with several different front ends.




38. ____ tests examine whether the application can process a large number of requests test types within a given period.




39. The stress test environment should be as close as possible to the __________ environment.




40. To implement a custom URL protocol handler, the URL method __________ is called.




41. ______ replace the objects with which the methods under test collaborate, offering a layer of isolation.




42. _________ are empty shells that supply methods to let the tests have control of the behavior of all the business methods of the faked class.




43. The most important point to consider when writing a mock is that it shouldn’t have any ______




44. Applying the _________ pattern to a class means removing the creation of all object instances for which this class isn’t directly responsible and passing any needed instances instead.




45. ______ is an architectural pattern that stores in-memory object data in relational databases.




46. _______ in computer science is a programming technique for converting data between incompatible type systems.




47. The ___________ is a software design pattern that allows the interface of an existing class to be used as another interface.




48. The _______________ is a design pattern that adds behavior to an individual object, either statically or dynamically, without affecting the behavior of other objects from the same class.




49. The ____________ is a design pattern in object-oriented programming that allows object composition to achieve the same code reuse as inheritance.




50. When unit testing, it’s important to be able to control as much as possible of the environment in which the tests execute.