/** * Called when a test has started. * * @param test The test that started. */ @Override public void startTest(Test test) { mFailed = false; TestCase testCase = (TestCase) test; mReporter.startHeartbeat(); mReporter.testStarted(testCase.getClass().getName(), testCase.getName()); }
/** * Called when a test has ended. * * @param test The test that ended. */ @Override public void endTest(Test test) { TestCase testCase = (TestCase) test; if (mFailed) { mReporter.testFailed(testCase.getClass().getName(), testCase.getName()); } else { mReporter.testPassed(testCase.getClass().getName(), testCase.getName()); } mReporter.stopHeartbeat(); }