@Override protected void runChild(final FrameworkMethod method, RunNotifier runNotifier) { Description methodDescription = describeChild(method); TestClass testClass = getTestClass(); Class<?> javaClass = testClass.getJavaClass(); TestifyJUnit4RunNotifier notifier = (TestifyJUnit4RunNotifier) runNotifier; MDC.put(TEST_CLASS_KEY, javaClass.getSimpleName()); MDC.put(TEST_METHOD_KEY, method.getName()); if (isIgnored(method)) { notifier.fireTestIgnored(methodDescription); } else { try { runLeaf(methodBlock(method), methodDescription, notifier); } catch (Exception e) { notifier.addFailure(e); notifier.pleaseStop(); } finally { if (!isIgnored(method)) { TestContextHolder.INSTANCE.command(testContext -> { LoggingUtil.INSTANCE.debug("performing cleanup of '{}'", testContext.getName()); TestRunner testRunner = testContext.getTestRunner(); testRunner.stop(testContext); TestContextHolder.INSTANCE.remove(); }); } } } }