emma.execute();
}
public static void report(MxTest mxtest) {
emmaTask emma = new emmaTask();
emma.setTaskName("emma");
emma.setProject(mxtest.getProject());
emma.init();
reportTask report = (reportTask) emma.createReport();
report.setTaskName("report");
report.setProject(mxtest.getProject());
report.init();
MaxmlMap reportAttributes = mxtest.getBuild().getConfig().getTaskAttributes("emmareport");
if (reportAttributes != null) {
AttributeReflector.setAttributes(mxtest.getProject(), report, reportAttributes);
}
report.setSourcepathRef(new Reference(mxtest.getProject(), Key.compileSourcePath.referenceId()));
XFileSet fileSet = new XFileSet();
fileSet.setProject(mxtest.getProject());
fileSet.setFile(mxtest.getEmmaData());
report.addFileset(fileSet);
report.createHtml().setOutfile(new File(mxtest.getCoverageReports(), "index.html").getAbsolutePath());
emma.execute();
}