jUnit/Junit Mcq Question Set 1 Sample Test,Sample questions

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

1.Erasable

2.Maintainable

3.Upgradeable

4.Changeable


Question:
 Stubs usually provide high ______ in the tested system.

1.Mocking

2. Security

3. Confidence

4.Modularity


Question:
 The JUnit hasItem() function is a ________

1. The JUnit hasItem() function is a ________

2.Instance Function

3.JUnitMatcher

4.Matcher


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

1.Adapter Pattern

2. Bridge Pattern

3.Decorator Pattern

4.Delegation Pattern


Question:
 User feedback is got from the ________

1.Development platform

2. Integration platform

3.Acceptance platform

4.Stress test platform


Question:
 What is the full form of JJ in “JJ-path”?

1. Jump-to-Jump

2.Java-JUnit

3. Jump-in-JUnit

4. Just Jump


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

1.Object

2.Class

3.Test

4. Stub


Question:
 Which of the following is also known as Beta Testing?

1. Unit testing

2. Functional testing

3.Box testing

4.Field testing


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

1. @RunWith annotation is used to run the suite test

2. Test suite means bundle a few unit test cases and run them together

3. @Suite annotation is used to run the suite test

4.All of the Mentioned


Question:
 Which of the following is not correct about JUnit?

1. Junit provides test runners for running test

2. Junit cannot be run automatically

3. Junit is the open-source framework

4.Junit provides an annotation to identify test methods


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

1.org.jmock.integration.junit3

2.org.jmock.lib.junit3

3.org.jmock

4.org.jmock.syntax


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

1.Objects

2.Classes

3.Servlet

4.Back end


Question:
API stands for _________

1.Application programming interface

2. Application programming instruction

3.Android programming interface

4. Application performance interface


Question:
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.

1.Message Passing

2.Inversion Of Control

3.Observer Pattern

4.Strategy Pattern


Question:
Class JUnitMatchers extends _________

1. java.lang.String

2. java.JUnit.util.*

3. java.util.Arrays

4. java.lang.Object


Question:
Developers often combine functional tests with __________ tests.

1.Unit

2. Integration

3.Stress

4.Lossless Development


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

1. Integration Testing

2. Functional Testing

3. Stress Testing

4.Unit Testing


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

1.Flexibility

2.Redundancy

3.Authorization

4.Simplicity


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

1.Objects

2. Variables

3. Classes

4.Methods


Question:
On the development platform, _________ unit tests are executed.

1.Acceptance

2.Lossless

3. Logic

4.Functional testing


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

1.Redundancy

2.Abstraction

3.Matchers

4.Business Logic


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

1. Design

2.Review

3. Test

4.Production


Question:
The test instantiates ___________ and calls methods on these _________

1. Objects

2. Classes

3.Services

4. Subsystems


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

1. Objects

2.Classes

3. Servlet

4. Subsystems


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

1. Development platform

2. Integration platform

3.Acceptance platform

4.Stress test platform


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

1.Adapter Pattern

2.Bridge Pattern

3.Decorator Pattern

4.Composite Pattern


Question:
The ___________ platform is the last staging area before production.

1.Development platform

2.Integration platform

3.Acceptance platform

4.Pre-production platform


Question:
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.

1.Adapter Pattern

2.Bridge Pattern

3. Decorator Pattern

4.Composite Pattern


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

1.Testing Mechanism

2.Testing Type

3. Test Cast

4.Test Scope


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

1. setURLStreamHandlerFactory

2. setURLStreamFactory

3.setURLStreamHandlerFactorySetting

4.setStreamHandlerFactory


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

1.True

2. False

3.JUnit

4.none of the above


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

1.Maven

2.XUnit

3. JUnit

4.Cobertura


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

1.Ant

2.Maven

3. Zimbra

4. Jetty


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

1.JunitRule

2. JunitRuleMockery

3. JunitMockery

4.JmockRuleMockery


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

1.Php

2.Java

3.JUnit

4. Apache Struts Framework


Question:
Which of the following is not a mocking framework?

1.Mockito

2. EasyMock

3.MockJava

4. PowerMock


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

1. Slice

2.Sprint

3. Cobertura

4.Manifesto


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

1.TestRule Interface

2.CreateRule Interface

3.RuleCreate Interface

4.RuleInitialize Interface


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

1.Unit testing

2. Load testing

3.Stress testing

4.Functional testing


Question:
Which of the following translates ExpectationErrors into JUnit AssertionFailedErrors?

1. VerifyingTestCase

2.MockObjectTestCase

3.JUnit3Mockery

4. JUnit3ErrorTranslator


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

1.Load Testing

2.Decision Table Testing

3.Unit Testing

4.Functional testing


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

1.Unit

2. Integration

3.Stress

4. Acceptance


Question:
_____ platform builds the application from its various components.

1. Development platform

2.Integration platform

3.Acceptance platform

4.Stress test platform


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

1.Active Record Pattern

2.Inversion Of Control

3.Observer Pattern

4.Strategy Pattern


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

1.Classes

2.Mocks

3. Unified Stamps

4.Interfaces


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

1.Active Record Pattern

2. Inversion Of Control

3.Object Relational Mapping

4.Strategy Pattern


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

1.Object Oriented Testing

2.Test Driven Development

3.Acceptance Testing

4.Lossless Development


Question:
_______ is favoured over conditionals to better write testable code.

1. Polymorphism

2.Composition

3.Inheritance

4.Overloading


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

1.Unit

2.Integration

3.Functional

4. Loss


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

1. Stubs

2. Jetty

3.Mocks

4.Interfaces


More MCQS

  1. Junit Mcq Question Set 1
  2. Junit Mcq Question Set 2
  3. Junit Mcq Question Set 3
  4. Junit Mcq Question Set 4
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!