log.info("Overriding threadCount [" + loadTest.getThreadCount() + "] with specified [" + threadCount + "]");
loadTest.setThreadCount(threadCount);
}
loadTest.addLoadTestRunListener(this);
LoadTestRunner runner = loadTest.run();
// wait for test to finish
while (!runner.hasStopped()) {
if (runner.getStatus() == Status.RUNNING) {
log.info("LoadTest [" + loadTest.getName() + "] progress: " + runner.getProgress() + ", "
+ runner.getRunningThreadCount());
}
Thread.sleep(1000);
}
log.info("LoadTest [" + loadTest.getName() + "] finished with status " + runner.getStatus().toString());
if (printReport) {
log.info("Exporting log and statistics for LoadTest [" + loadTest.getName() + "]");
loadTest.getStatisticsModel().finish();