Package eu.simuline.testhelpers
Class ExtRunListener
- java.lang.Object
-
- org.junit.runner.notification.RunListener
-
- eu.simuline.testhelpers.ExtRunListener
-
- Direct Known Subclasses:
GUIRunListener
,SeqRunListener
,TextRunListener
public class ExtRunListener extends RunListener
Extension ofRunListener
, version junit 4.12. adds methods-
testSuiteStarted(Description)
andtestSuiteFinished(Description)
which is added toRunListener
, version junit 4.13 which is not yet available. -
testRunAborted()
andtestClassStructureLoaded(Description)
needed in conjunction with our user interfaces.
- Version:
- 1.0
- Author:
- Ernst Reissner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener
RunListener.ThreadSafe
-
-
Constructor Summary
Constructors Constructor Description ExtRunListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testClassStructureLoaded(Description desc)
Invoked if a test class is loaded defining a testsuite described bydesc
.void
testRunAborted()
Invoked for stop and for break originated by the user.void
testSuiteFinished(Description desc)
Called when a test suite has finished, whether the test suite succeeds or fails.void
testSuiteStarted(Description desc)
Called when a test suite is about to be started.-
Methods inherited from class org.junit.runner.notification.RunListener
testAssumptionFailure, testFailure, testFinished, testIgnored, testRunFinished, testRunStarted, testStarted
-
-
-
-
Method Detail
-
testSuiteStarted
public void testSuiteStarted(Description desc) throws java.lang.Exception
Called when a test suite is about to be started. If this method is called for a givenDescription
, thentestSuiteFinished(Description)
will also be called for the sameDescription
.Note that not all runners will call this method, so runners should be prepared to handle
RunListener.testStarted(Description)
calls for tests where there was no correspondingtestSuiteStarted(Description)
call for the parentDescription
.- Parameters:
desc
- the description of the test suite that is about to be run (generally a class name)- Throws:
java.lang.Exception
- Since:
- 4.13
-
testSuiteFinished
public void testSuiteFinished(Description desc) throws java.lang.Exception
Called when a test suite has finished, whether the test suite succeeds or fails. This method will not be called for a givenDescription
unlesstestSuiteStarted(Description)
was called for the sameDescription
.- Parameters:
desc
- the description of the test suite that just ran- Throws:
java.lang.Exception
- Since:
- 4.13
-
testRunAborted
public void testRunAborted()
Invoked for stop and for break originated by the user.
-
testClassStructureLoaded
public void testClassStructureLoaded(Description desc)
Invoked if a test class is loaded defining a testsuite described bydesc
.
-
-