CSVFormatter dataFormatter = new CSVFormatter();
//keeping getting the TestResult until done
while(0 < workGroup.currentDataCount())
{
TestResult result = workGroup.popWorkResult();
dataFormatter.addRow(result);
}
//write result.csv
SimpleFileIO.writeStringToTextFile(dataFormatter.toString(), "Result.csv");