void doFinish() {
		for (PerfTest each : perfTestService.getAllAbnormalTesting()) {
			SingleConsole consoleUsingPort = consoleManager.getConsoleUsingPort(each.getPort());
			doTerminate(each, consoleUsingPort);
			LOG.info(format(each, "Abnormal test is terminated.", each.getId()));
			cleanUp(each);
			notifyFinish(each, StopReason.TOO_MANY_ERRORS);
		}

		for (PerfTest each : perfTestService.getAllStopRequested()) {
			SingleConsole consoleUsingPort = consoleManager.getConsoleUsingPort(each.getPort());
			doCancel(each, consoleUsingPort);
			LOG.info(format(each, "Test is Stopped."));
			cleanUp(each);
			notifyFinish(each, StopReason.CANCEL_BY_USER);
		}

		for (PerfTest each : perfTestService.getAllTesting()) {
			SingleConsole consoleUsingPort = consoleManager.getConsoleUsingPort(each.getPort());
			if (isTestFinishCandidate(each, consoleUsingPort)) {
				doNormalFinish(each, consoleUsingPort);
				LOG.info(format(each, "Test is finished.", each.getId()));
				cleanUp(each);
				notifyFinish(each, StopReason.NORMAL);
			}
		}
	}
Finish the tests.(Scheduled by SpringTask)
<p/>
There are three types of test finish.
<p/>
<ul>
<li>Abnormal test finish : when TPS is too low or too many errors occur</li>
<li>User requested test finish : when user requested to finish the test</li>
<li>Normal test finish : when the test reaches the planned duration and run
count.</li>
</ul>
ngrinder-controller/src/main/java/org/ngrinder/perftest/service/PerfTestRunnable.java