Examples of JsTestResultReporter


Examples of com.philmander.jstest.report.JsTestResultReporter

  private void reportResults(JsTestResults results) {

    for(ReportType report : reports) {

      JsTestResultReporter reporter;
     
      //pick a reporter implementation
      if(report.getType().trim().equalsIgnoreCase("plain")) {
        reporter = new PlainReporter();
      } else {
        //default to plain reporter
        reporter = new PlainReporter();
      }       
     
      if(report.getDestFile() == null) {
        error("Could not write a report, destFile attribute was not set");
        continue;
      }

      try {
        log("Writing report to " + report.getDestFile().getAbsolutePath());
        File outFile = report.getDestFile();
        Files.createParentDirs(outFile);
        Files.touch(outFile);
        Files.write(reporter.createReport(results), outFile, Charsets.UTF_8);
      } catch (IOException e) {
        error("Could not write report file: " + e.getMessage());
      }
    }
  }
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.