/** * Runs the tests and collects their result in a TestResult. * * <p>We must override this method in order to run against JUnit4 which doesn't invoke tests(). */ public void run(TestResult result) { for (Enumeration e = tests(); e.hasMoreElements(); ) { Test each = (Test) e.nextElement(); if (result.shouldStop()) break; runTest(each, result); } }
@Override public void run(final TestResult testResult) { List<Class> classes = myTestCaseLoader.getClasses(); int totalTests = classes.size(); for (final Class aClass : classes) { runNextTest(testResult, totalTests, aClass); if (testResult.shouldStop()) break; } tryGc(10); }