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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum