The default implementation does nothing. Concrete implementations can
+ * override this method as appropriate.
+ *
+ * @param context the current extension context; never {@code null}
+ * @param reason the reason the test is disabled; never {@code null} but
+ */
+ @Override
+ public void testDisabled(ExtensionContext context, Optional The default implementation does nothing. Concrete implementations can
+ * override this method as appropriate.
+ *
+ * @param context the current extension context; never {@code null}
+ */
+ @Override
+ public void testSuccessful(ExtensionContext context) {
+ float time = (float) (System.currentTimeMillis() - start) / 1000;
+ String testName = context.getTestMethod().orElse(context.getRequiredTestMethod()).getName();
+ String displayName = context.getDisplayName();
+ displayName = displayName.equals(testName + "()") ? "" : displayName;
+ String status = ANSI_GREEN + "SUCCEEDED" + ANSI_RESET;
+ logger.info(String.format(FORMAT, testName, displayName, status, time));
+ }
+
+
+ /**
+ * Invoked after a test has been aborted.
+ *
+ * The default implementation does nothing. Concrete implementations can
+ * override this method as appropriate.
+ *
+ * @param context the current extension context; never {@code null}
+ * @param cause the throwable responsible for the test being aborted; may be {@code null}
+ */
+ @Override
+ public void testAborted(ExtensionContext context, Throwable cause) {
+ float time = (float) (System.currentTimeMillis() - start) / 1000;
+ String testName = context.getTestMethod().orElse(context.getRequiredTestMethod()).getName();
+ String displayName = context.getDisplayName();
+ displayName = displayName.equals(testName + "()") ? "" : displayName;
+ String status = ANSI_YELLOW + "ABORTED" + ANSI_RESET;
+ logger.info(String.format(FORMAT, testName, displayName, status, time));
+ }
+
+
+ /**
+ * Invoked after a test has failed.
+ *
+ * The default implementation does nothing. Concrete implementations can
+ * override this method as appropriate.
+ *
+ * @param context the current extension context; never {@code null}
+ * @param cause the throwable that caused test failure; may be {@code null}
+ */
+ @Override
+ public void testFailed(ExtensionContext context, Throwable cause) {
+ float time = (float) (System.currentTimeMillis() - start) / 1000;
+ String testName = context.getTestMethod().orElse(context.getRequiredTestMethod()).getName();
+ String displayName = context.getDisplayName();
+ displayName = displayName.equals(testName + "()") ? "" : displayName;
+ String status = ANSI_RED + "FAILED" + ANSI_RESET;
+ logger.info(String.format(FORMAT, testName, displayName, status, time));
+ }
+
+}
diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml
index d1cfd9e..49ba851 100644
--- a/src/test/resources/logback-test.xml
+++ b/src/test/resources/logback-test.xml
@@ -1,10 +1,12 @@