Q.1
Which of the following is not correct about JUnit?
  • a) Junit provides test runners for running test
  • b) Junit cannot be run automatically
  • c) Junit is the open-source framework
  • d) Junit provides an annotation to identify test methods
Q.2
JUnit is used for what type of software testing for the Java language?
  • a) Functional Testing
  • b) System Testing
  • c) Unit Testing
  • d) Integration Testing
Q.3
Which annotation implies that a method is a JUnit test case?
  • a) @org.junit.Test
  • b) @org.Test
  • c) @testcase
  • d) @junit
Q.4
JUnit test files are written in files with which file extension?
  • a) .unit
  • b) .java
  • c) .test
  • d) .junit
Q.5
Which methods cannot be tested by the JUnit test class?
  • a) protected methods
  • b) methods with void return type
  • c) private methods
  • d) public methods
Q.6
JUnit runners are available in which package?
  • a) org.junit.files.runners
  • b) org.runners
  • c) junitfiles.runners
  • d) org.junit.runners
Q.7
What is a Façade in JUnit?
  • a) Façade is a design pattern that provides a unified interface to a set of interfaces in a subsystem
  • b) Façade is a group of test cases
  • c) Façade is a group of mock objects
  • d) Façade is a collection of supercases
Q.8
What does the fail() method do in JUnit?
  • a) Outputs the message “Fail” to the console
  • b) Pauses the test for 1 second
  • c) Throws an assertion error unconditionally
  • d) Calls the default constructor
Q.9
To run the file TestClass.class from the command line, we have to type what?
  • a) org.junit.runner.JUnitCore TestObject
  • b) java org.junit.runner.JUnitCore TestClass
  • c) javac TestCase
  • d) org.junit.java TestCase
Q.10
JUnit Suites are independent of the capability of the ______ system.
  • a) Build
  • b) Test
  • c) Method
  • d) Run
Q.11
Which of the following is an example of a web controller?
  • a) Php
  • b) Java
  • c) JUnit
  • d) Apache Struts Framework
Q.12
Which of the following is not a mocking framework?
  • a) Mockito
  • b) EasyMock
  • c) MockJava
  • d) PowerMock
Q.13
Which of the following is correct about Test Suite in JUnit?
  • a) @RunWith annotation is used to run the suite test
  • b) Test suite means bundle a few unit test cases and run them together
  • c) @Suite annotation is used to run the suite test
  • d) All of the Mentioned
Q.14
The JUnit hasItem() function is a _____________
  • a) Matcher
  • b) JUnitMatcher
  • c) Instance Function
  • d) Hamcrest Matcher
Q.15
Which of the following is also known as Beta Testing?
  • a) Unit testing
  • b) Functional testing
  • c) Box testing
  • d) Field testing
Q.16
JUnit test methods must compulsorily return what value?
  • a) void
  • b) Object
  • c) String
  • d) int
Q.17
Which of the following is a free Java tool that calculates the percentage of code accessed by tests?
  • a) Maven
  • b) XUnit
  • c) JUnit
  • d) Cobertura
Q.18
Which package contains interfaces that define jMock’s Domain Specific Embedded Language?
  • a) org.jmock.integration.junit3
  • b) org.jmock.lib.junit3
  • c) org.jmock
  • d) org.jmock.syntax
Q.19
Class JUnitMatchers extends _______________
  • a) java.lang.String
  • b) java.JUnit.util.*
  • c) java.util.Arrays
  • d) java.lang.Object
Q.20
Which of the following test has to be completed before integration testing?
  • a) Unit testing
  • b) Load testing
  • c) Stress testing
  • d) Functional testing
0 h : 0 m : 1 s