public void onTestingFinished(@NotNull SMTestProxy.SMRootTestProxy testsRoot) { myEndTime = System.currentTimeMillis(); if (myTotalTestCount == 0) { myTotalTestCount = myStartedTestCount; myStatusLine.setFraction(1); } updateStatusLabel(true); updateIconProgress(true); myAnimator.stopMovie(); myTreeBuilder.updateFromRoot(); LvcsHelper.addLabel(this); final Runnable onDone = new Runnable() { @Override public void run() { myTestsRunning = false; final boolean sortByDuration = TestConsoleProperties.SORT_BY_DURATION.value(myProperties); if (sortByDuration) { myTreeBuilder.setStatisticsComparator(myProperties, sortByDuration); } } }; if (myLastSelected == null) { selectAndNotify(myTestsRootNode, onDone); } else { onDone.run(); } fireOnTestingFinished(); if (testsRoot.wasTerminated() && myStatusLine.getStatusColor() == ColorProgressBar.GREEN) { myStatusLine.setStatusColor(JBColor.LIGHT_GRAY); } if (testsRoot.isEmptySuite() && testsRoot.isTestsReporterAttached() && myProperties instanceof SMTRunnerConsoleProperties && ((SMTRunnerConsoleProperties) myProperties).fixEmptySuite()) { return; } final TestsUIUtil.TestResultPresentation presentation = new TestsUIUtil.TestResultPresentation(testsRoot, myStartTime > 0, null) .getPresentation( myFailedTestCount, myFinishedTestCount - myFailedTestCount - myIgnoredTestCount, myTotalTestCount - myFinishedTestCount, myIgnoredTestCount); TestsUIUtil.notifyByBalloon(myProperties.getProject(), testsRoot, myProperties, presentation); addToHistory(testsRoot, myProperties, this); }
private void updateIconProgress(boolean updateWithAttention) { final int totalTestCount, doneTestCount; if (myTotalTestCount == 0) { totalTestCount = 2; doneTestCount = 1; } else { totalTestCount = myTotalTestCount; doneTestCount = myFinishedTestCount; } TestsUIUtil.showIconProgress( myProject, doneTestCount, totalTestCount, myFailedTestCount, updateWithAttention); }
protected void notifyByBalloon( JUnitRunningModel model, boolean started, JUnitConsoleProperties consoleProperties) { TestsUIUtil.notifyByBalloon( myProject, started, model != null ? model.getRoot() : null, consoleProperties); }
public Object getData(@NonNls final String dataId) { if (SM_TEST_RUNNER_STATISTICS.is(dataId)) { return this; } return TestsUIUtil.getData(getSelectedItem(), dataId, myFrameworkRunningModel); }