Home / CSE MCQs / JUnit MCQs :: Testing with Mock Objects

CSE MCQs :: JUnit MCQs

  1. The source code directories are used to calculate the ____________ of each class.
  2. A.
    Data size
    B.
    Lines of code
    C.
    Cyclomatic code complexity
    D.
    Mutant score

  3. A solution to reducing dependencies is to separate code between methods that instantiate new ____________ and methods that provide application logic.
  4. A.
    Classes
    B.
    Objects
    C.
    Modules
    D.
    Functions

  5. The obvious drawback of a singleton is that it introduces _____________ into the application.
  6. A.
    Redundancies
    B.
    Errors
    C.
    Global State
    D.
    Modules

  7. In a narrower sense, LCSAJ is also called ____________
  8. A.
    JJ-Path
    B.
    Code Coverage
    C.
    System Code Analysis
    D.
    Code Breakdown

  9. White box testing is also known as ______________
  10. A.
    Black box testing
    B.
    Sand box testing
    C.
    Closed testing
    D.
    Glass box testing

  11. A ________________is a test that focuses on the interaction between components in their real environment.
  12. A.
    Logic unit test
    B.
    Integration unit test
    C.
    Functional unit test
    D.
    Acceptance unit test

  13. The test runs while a ___________ or EJB container hosts the application.
  14. A.
    Objects
    B.
    Classes
    C.
    Servlet
    D.
    Subsystems

  15. ______________ tests examine the code at the boundary of its public API.
  16. A.
    Unit
    B.
    Integration
    C.
    Functional
    D.
    Loss

  17. The default value for the “datafile parameter is ____________
  18. A.
    cobertura.ser
    B.
    cobertura.dat
    C.
    datafile.ser
    D.
    cobertura.log

  19. Cobertura is based on ____________
  20. A.
    JUnit
    B.
    XUnit
    C.
    Maven
    D.
    Jcoverage