Package org.cishell.testing.convertertester.core.tester2.reportgen.allconvs

Examples of org.cishell.testing.convertertester.core.tester2.reportgen.allconvs.AllConvsReportGenerator


    ConvResult[] convResults  = generateConvResults(convToTestsToPasses,
                        allConvs, trustedConvs);
   
//    addFaultInfo(convResults, trustedConvs, faultHeuristic);
   
    return new AllConvsResult(convResults);
   
  }
View Full Code Here


   
    Converter[] allConverters = converterGraph.getAllConverters();
   
    ChanceAtFaultHeuristic faultHeuristic =
      new ErrorProximityHeuristic();
    AllConvsResult allConvertersResult =
      ConvResultMaker.generate(allTestsResult, allConverters,
          faultHeuristic);
   
    //feed test results to the report generators
   
View Full Code Here

    //run the tests
 
    TestResult[] rawResults =
      runAllTests(converterGraph, testPathFilter, cContext, bContext);
   
    AllTestsResult allTestsResult = new AllTestsResult(rawResults);
   
    //analyze the test results to extract more useful info
   
    Converter[] allConverters = converterGraph.getAllConverters();
   
View Full Code Here

       * is trusted.
       */

      boolean isTrusted = trustedConvList.contains(conv);

      ConvResult convResult = new ConvResult(conv, isTrusted,
          testToPasses);

      convResults.add(convResult);
    }
    // return the converter result objects
View Full Code Here

 
  public void generate(ConvResult cr) {

    FileOutputStream reportOutStream = null;
    try {
      ConvResult convResult = cr;
      Converter conv = convResult.getConverter();

      File reportFile = new File(ReportGenerator.TEMP_DIR + cr.getUniqueName());
      reportOutStream = new FileOutputStream(reportFile);

      PrintStream report = new PrintStream(reportOutStream);

      report.println("Converter Report");
      report.println("--------------------------------------");
      report.println("");
      report.println(cr.getUniqueName());
      report.println("");
      if (convResult.isTrusted()) {
        report.println("Trusted");
      } else {
        report.println("Not Trusted");

      }
      report.println("");
     
      if (cr.wasTested()) {
        report.println("# of files passed through :"
            + convResult.getNumFilePasses());
        report.println("");
//        report.println("% Passed                  : "
//            + FormatUtil.formatToPercent(convResult.getPercentPassed()));
        report.println("% Chance of Flaw          : "
            + FormatUtil.formatToPercent(convResult.getChanceOfFlaw()));

        report.println("");

        report.println("Involved in the following tests...");
        TestResult[] involvedTests = cr.getTestsBySuccess();
View Full Code Here

  private Map getChanceAtFaultsByExpln(AllConvsResult acr) {
    Map explnToCafs = new HashMap();
   
    ConvResult[] crs = acr.getConvResults();
    for (int ii = 0; ii < crs.length; ii++) {
      ConvResult cr = crs[ii];
     
      ChanceAtFault[] cafs = cr.getAllChanceAtFaults();
      for (int jj = 0; jj < cafs.length; jj++) {
        ChanceAtFault caf = cafs[jj];
       
        String expln = caf.getExplanation();
       
View Full Code Here

      List trustedConvs = new ArrayList();
      List nonTrustedConvs = new ArrayList();
      List nonTestedConvs = new ArrayList();

      for (int ii = 0; ii < convResults.length; ii++) {
        ConvResult cr = convResults[ii];

        if (cr.isTrusted()) {
          trustedConvs.add(cr);
        } else if (cr.wasTested()) {
          nonTrustedConvs.add(cr);
        } else {
          nonTestedConvs.add(cr);
        }
      }
     
      report.println("Summary...");
      report.println("  # of Trusted Converters                  : " +
          trustedConvs.size());
      report.println("  # of Non-Trusted Converters              : " +
          nonTrustedConvs.size());
      report.println("  # of Untested Converters                 :"  +
          nonTestedConvs.size());
      report.println("  Total # of Converters                    : " +
          convResults.length);
     
      report.println("");
     
      report.println("  Average chance each converter is correct : " +
          FormatUtil.formatToPercent(avgChanceCorrect));
      report.println("  Average % successful file passes         : " +
          FormatUtil.formatToPercent(avgPercentPassed));

     
      report.println("");
     
      report.println("Trusted Converters...");
      for (int ii = 0; ii < trustedConvs.size(); ii++) {
        ConvResult cr = (ConvResult) trustedConvs.get(ii);
       
        if (cr.wasTested()) {
          //add this converters name to all convs report
          report.println("  " + cr.getShortName());
        }
      }
      report.println("");
     
      report.println("Non-Trusted Tested Converters...");
      for (int ii = 0; ii < nonTrustedConvs.size(); ii++) {
        ConvResult cr = (ConvResult) nonTrustedConvs.get(ii);
       
        if (cr.wasTested()) {
          //add this converters name to all convs report
          report.println("  " + cr.getShortName());
        }
      }
     
      report.println("");
     
      report.println("Untested Converters...");
      for (int ii = 0; ii < convResults.length; ii++) {
        ConvResult cr = convResults[ii];
       
        if (! cr.wasTested()) {
          report.println("  " + cr.getShortName());
        }
      }
      report.println("");
     
      for (int ii = 0; ii < convResults.length; ii++) {
View Full Code Here

          //raw names are now short names
          String convName = rawConvName.replaceAll("\"", "");
         
          boolean wroteAttributes = false;
          for (int ii = 0; ii < convs.length ; ii++) {
            ConvResult cr = convs[ii];
            if (cr.getShortName().equals(convName)) {
              int trusted;
             
              if (cr.isTrusted()) {
                trusted = 1;
              } else {
                trusted = 0;
              }
             
              writer.write(line + " " + trusted
                + " " +
                FormatUtil.formatToPercent(cr.getChanceCorrect())
                + " 1 " + "\r\n");
              wroteAttributes = true;
              break;
            }
          }
View Full Code Here

        int FAILED = -1;
        int NEVER_TESTED = 0; // array entries are 0 by default
       
        int[] trusted = new int[tr.getAllConverters().length];
        for (int jj = 0; jj < fprs.length; jj++) {
          FilePassResult fpr = fprs[jj];
         
          if (fpr.succeeded()) {
            for (int kk = 0; kk < trusted.length; kk++) {
              if (trusted[kk] != FAILED) {
                trusted[kk] += 1;
              }
            }
          } else if (fpr.failedWhileComparingGraphs()) {
            for (int kk = 0; kk < trusted.length; kk++) {
              trusted[kk] = FAILED;
            }
          } else if (fpr.failedWhileConverting()) {
            Converter[] convsInvolved = fpr.getConvertersInvolved();
            for (int kk = 0; kk < convsInvolved.length; kk++) {
              trusted[kk] = FAILED;
            }
          }
         
View Full Code Here

      TestResult tr = trs[ii];
     
      FilePassResult[] fps = tr.getFilePassResults();
      //for each file pass...
      for (int jj = 0; jj < fps.length; jj++) {
        FilePassResult fp = fps[jj];
       
        Converter[] convsInvolved = fp.getConvertersInvolved();
       
        /*
         * associate the file pass with the chance that each converter
         * involved is at fault.
         */
       
        if (! fp.succeeded()) {
          ChanceAtFault[] chanceAtFaults  = faultHeuristic.determine(fp,
              convsInvolved, trustedConvs);
          for (int kk = 0; kk < chanceAtFaults.length; kk++) {
            ChanceAtFault caf = chanceAtFaults[kk];
            fp.addChanceAtFault(caf);
          }
        }
       
        //for each converter involved...
        for (int kk = 0; kk < convsInvolved.length; kk++) {
View Full Code Here

TOP

Related Classes of org.cishell.testing.convertertester.core.tester2.reportgen.allconvs.AllConvsReportGenerator

Copyright © 2018 www.massapicom. 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.