Home / CSE MCQs / JUnit MCQs :: Discussion

Discussion :: JUnit MCQs

  1. To listen to events during a test, which class has to be extended?
  2. A.
    org.junit.runner.notification.RunListener
    B.
    org.junit.runner.Listener
    C.
    org.junit.runner.notification.Listener
    D.
    org.junit.runner.RunListener

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    To respond to events during a test run, RunListener is extended and the appropriate methods overridden. If a listener throws an exception during a test event, it is removed for the remainder of the test run.


Be The First To Comment