@Override
public void run() {
TestBedConfiguration.reloadConfigFileIfModified();
boolean start = command.equals("start");
TestResult tr = new TestResultImpl((start ? "(Re)start" : "Stop") + " SUT", null, null, 1, 1);
tr.start();
// TODO: Check this!
TestResultsReportManager reportManager = TestResultsReportManager.getInstance(); //getReporters("Manual SUT " + (start ? "start" : "stop"));
if ( CampaignManager.getInstance().getCurrentCampaign() != null )
{
reportManager.startReport(CampaignManager.getInstance().getTimeStampCampaign(), "Manual SUT " + (start ? "start" : "stop"));
}
else
{
reportManager.startReport(new Date(), "Manual SUT " + (start ? "start" : "stop"));
}
reportManager.putEntry(tr);
if (start) {
TestEngine.stopSUT(null);
TestEngine.startSUT(tr);
} else {
TestEngine.stopSUT(tr);
}
tr.stop();
reportManager.refresh();
//reportManager.putEntry(tr);
SwingUtilities.invokeLater(new Runnable() {