Explore topic-wise MCQs in Junit.

This section includes 13 Mcqs, each offering curated multiple-choice questions to sharpen your Junit knowledge and support exam preparation. Choose a topic below to get started.

1.

To use cobertura, we need to include __________

A. cobertura.jar
B. junit.jar
C. hamcrest.jar
D. junitCobertura.jar
Answer» B. junit.jar
2.

The default value for the –datafile parameter is ____________

A. cobertura.ser
B. cobertura.dat
C. datafile.ser
D. cobertura.log
Answer» B. cobertura.dat
3.

___________ is used to add extra classes and jar files to Cobertura.

A. −−datafile
B. −−destination
C. −−ignore
D. −−auxClasspath
Answer» E.
4.

TO_USE_COBERTURA,_WE_NEED_TO_INCLUDE___________?$

A. cobertura.jar
B. junit.jar
C. hamcrest.jar
D. junitCobertura.jar
Answer» B. junit.jar
5.

THE_DEFAULT_VALUE_FOR_THE_‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚ÀÖ¬®DATAFILE_PARAMETER_IS_____________?$#

A. cobertura.ser
B. cobertura.dat
C. datafile.ser
D. cobertura.log
Answer» B. cobertura.dat
6.

___________ is used to add extra classes and jar files to Cobertura?

A. −−datafile
B. −−destination
C. −−ignore
D. −−auxClasspath
Answer» E.
7.

___________ specifies a regular expression to filter out certain lines of the source code.

A. −−datafile
B. −−destination
C. −−ignore
D. −−basedir
Answer» D. ‚Äö√Ñ√∂‚àö‚Ć‚àö‚ↂÄö√Ñ√∂‚àö‚Ć‚àö‚â†basedir
8.

________ specifies the output directory for the instrumented classes.

A. −−datafile
B. −−destination
C. −−ignore
D. −−basedir
Answer» C. ‚Äö√Ñ√∂‚àö‚Ć‚àö‚ↂÄö√Ñ√∂‚àö‚Ć‚àö‚â†ignore
9.

______________ is used to specify the name of the file to use for storing the metadata about the classes.

A. −−datafile
B. −−destination
C. −−ignore
D. −−basedir
Answer» B. ‚Äö√Ñ√∂‚àö‚Ć‚àö‚ↂÄö√Ñ√∂‚àö‚Ć‚àö‚â†destination
10.

While using Cobertura from the command line, which parameter specifies the base directory?

A. −−datafile
B. −−destination
C. −−ignore
D. −−basedir
Answer» E.
11.

In order to measure test coverage, Cobertura creates __________ of class files specified.

A. Instrumented copies
B. Objects
C. Mocks
D. Images
Answer» B. Objects
12.

Cobertura is based on ____________

A. JUnit
B. XUnit
C. Maven
D. Jcoverage
Answer» E.
13.

_________ is a free Java tool that calculates the percentage of code accessed by tests.

A. Cobertura
B. JUnit
C. XUnit
D. Maven
Answer» B. JUnit