File tree 2 files changed +14
-2
lines changed
src/main/java/org/junit/runner/notification
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,14 @@ public void testRunFinished(Result result) throws Exception {
70
70
}
71
71
72
72
/**
73
- * Called when a test suite is about to be started.
73
+ * Called when a test suite is about to be started. If this method is
74
+ * called for a given {@link Description}, then {@link #testSuiteFinished(Description)}
75
+ * will also be called for the same {@code Description}.
76
+ *
77
+ * <p>Note that not all runners will call this method, so runners should
78
+ * be prepared to handle {@link #testStarted(Description)} calls for tests
79
+ * where there was no cooresponding {@code testSuiteStarted()} call for
80
+ * the parent {@code Description}.
74
81
*
75
82
* @param description the description of the test suite that is about to be run
76
83
* (generally a class name)
@@ -81,6 +88,8 @@ public void testSuiteStarted(Description description) throws Exception {
81
88
82
89
/**
83
90
* Called when a test suite has finished, whether the test suite succeeds or fails.
91
+ * This method will not be called for a given {@link Description} unless
92
+ * {@link #testSuiteStarted(Description)} was called for the same @code Description}.
84
93
*
85
94
* @param description the description of the test suite that just ran
86
95
* @since 4.13
Original file line number Diff line number Diff line change @@ -106,7 +106,10 @@ protected void notifyListener(RunListener each) throws Exception {
106
106
}
107
107
108
108
/**
109
- * Invoke to tell listeners that a test suite is about to start.
109
+ * Invoke to tell listeners that a test suite is about to start. Runners are strongly
110
+ * encouraged--but not required--to call this method. If this method is called for
111
+ * a given {@link Description} then {@link #fireTestSuiteFinished(Description)} MUST
112
+ * be called for the same {@code Description}.
110
113
*
111
114
* @param description the description of the suite test (generally a class name)
112
115
* @since 4.13
You can’t perform that action at this time.
0 commit comments