πŸ§ͺ jUnit MCQ Quiz Hub

Junit Mcq Question Set 1

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

Which of the following is not correct about JUnit?





βœ… Correct Answer: 2

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





βœ… Correct Answer: 4

Which of the following is not a mocking framework?





βœ… Correct Answer: 4

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





βœ… Correct Answer: 4

Which of the following is also known as Beta Testing?





βœ… Correct Answer: 4

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





βœ… Correct Answer: 4

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





βœ… Correct Answer: 4

Class JUnitMatchers extends _________





βœ… Correct Answer: 4

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





βœ… Correct Answer: 1

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





βœ… Correct Answer: 2

Which of the following translates ExpectationErrors into JUnit AssertionFailedErrors?





βœ… Correct Answer: 4

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





βœ… Correct Answer: 2

What is the full form of JJ in β€œJJ-path”?





βœ… Correct Answer: 1

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





βœ… Correct Answer: 4

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





βœ… Correct Answer: 1

Stubs usually provide high ______ in the tested system.





βœ… Correct Answer: 3

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





βœ… Correct Answer: 3

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





βœ… Correct Answer: 2

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





βœ… Correct Answer: 1

The JUnit hasItem() function is a ________





βœ… Correct Answer: 3

_______ is favoured over conditionals to better write testable code.





βœ… Correct Answer: 1

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





βœ… Correct Answer: 2

API stands for _________





βœ… Correct Answer: 1

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





βœ… Correct Answer: 3

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





βœ… Correct Answer: 2

_____ platform builds the application from its various components.





βœ… Correct Answer: 2

The ___________ platform is the last staging area before production.





βœ… Correct Answer: 4

On the development platform, _________ unit tests are executed.





βœ… Correct Answer: 3

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





βœ… Correct Answer: 4

User feedback is got from the ________





βœ… Correct Answer: 3

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





βœ… Correct Answer: 2

The test instantiates ___________ and calls methods on these _________





βœ… Correct Answer: 1

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





βœ… Correct Answer: 3

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





βœ… Correct Answer: 4

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





βœ… Correct Answer: 3

Developers often combine functional tests with __________ tests.





βœ… Correct Answer: 2

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





βœ… Correct Answer: 1

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





βœ… Correct Answer: 3

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





βœ… Correct Answer: 4

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





βœ… Correct Answer: 1

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





βœ… Correct Answer: 2

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





βœ… Correct Answer: 3

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





βœ… Correct Answer: 4

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.





βœ… Correct Answer: 2

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





βœ… Correct Answer: 1

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





βœ… Correct Answer: 3

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





βœ… Correct Answer: 1

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.





βœ… Correct Answer: 3

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





βœ… Correct Answer: 4

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





βœ… Correct Answer: 1