Examples of emmaTask


Examples of com.vladium.emma.emmaTask

* Utility class for EMMA code-coverage.
*/
public class Emma {

  public static void instrument(MxTest mxtest) {
    emmaTask emma = new emmaTask();
    emma.setTaskName("emma");
    emma.setProject(mxtest.getProject());
    emma.init();
   
    instrTask instr = (instrTask) emma.createInstr();
    instr.setTaskName("instr");
    instr.setProject(mxtest.getProject());
    instr.setMetadatafile(mxtest.getEmmaData());
    instr.setDestdir(mxtest.getInstrumentedBuild());
    instr.createInstrpath().setLocation(mxtest.getClassesDir());
    MaxmlMap instrAttributes = mxtest.getBuild().getConfig().getTaskAttributes("emma");
    if (instrAttributes != null) {
      AttributeReflector.setAttributes(mxtest.getProject(), instr, instrAttributes);
    }
   
    emma.execute();
  }
View Full Code Here

Examples of com.vladium.emma.emmaTask

   
    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();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.