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

Examples of org.cishell.testing.convertertester.core.tester2.ConvResultMaker


          report.println("Unique Failure Explanations " +
              "(sorted by likelihood)...");

          for (int ii = 0; ii < failureExplns.length; ii++) {
            ChanceAtFault failureExp = failureExplns[ii];
            FilePassResult filePass = failureExp.getFailedFilePass();
           
            if (filePass.failedWhileConverting()) {
              report.println("While converting " +
                  filePass.getOriginalFileShortLabel() +
                  "...");
            }
           
            String explanation = failureExp.getExplanation();
            float chanceAtFault = failureExp.getChanceAtFault();
View Full Code Here


            = (Map) testToPassesToCafs.get(test);
         
          Set passes = passToCafs.keySet();
          Iterator passIter = passes.iterator();
          while (passIter.hasNext()) {
            FilePassResult pass = (FilePassResult) passIter.next();
           
            report.println("  " + pass.getName());
            report.println("  " + pass.getOriginalFileShortLabel());
           
            List cafs = (List) passToCafs.get(pass);
           
            Converter[] involvedConvs = pass.getConvertersInvolved();
            for (int jj = 0; jj < involvedConvs.length; jj++) {
              Converter involvedConv = involvedConvs[jj];
             
              ChanceAtFault associatedCaf =
                getCafAssociatedWithProvidedConverter(
View Full Code Here

  //Map<test, Map<pass, List<cafs>>>
  private Map categorizeByTestAndPass(List cafList) {
    Map testToPassesToCafs = new HashMap();
    for (int ii = 0; ii < cafList.size(); ii++) {
      ChanceAtFault caf = (ChanceAtFault) cafList.get(ii)
      FilePassResult pass = caf.getFailedFilePass();
      TestResult test = pass.getParent();
     
      Map passToCafs;
      List cafs;
     
      passToCafs = (Map) testToPassesToCafs.get(test);
View Full Code Here

        = (Map) testToPassesToCafs.get(test);
     
      Set passes = passToCafs.keySet();
      Iterator passIter = passes.iterator();
      while (passIter.hasNext()) {
        FilePassResult pass = (FilePassResult) passIter.next();
       
        List cafList = (List) passToCafs.get(pass);
        ChanceAtFault[] cafs =
          (ChanceAtFault[]) cafList.toArray(new ChanceAtFault[0]);
       
View Full Code Here

      report.println("");
      FilePassResult[] successfulFPs = tr.getFilePassSuccesses();
      report.println("Successful File Passes...");
      report.println("");
      for (int ii = 0; ii < successfulFPs.length; ii++) {
        FilePassResult successfulFP = successfulFPs[ii];
        report.println(successfulFP.getNameWithPhaseExpln());
        filePassSubGen.writeReport(report, successfulFP);
      }
      report.println("");
     
      FilePassResult[] failedFPs = tr.getFilePassFailures();
      report.println("Failed File Passes...");
      report.println("");
      for (int ii = 0; ii < failedFPs.length; ii++) {
        FilePassResult failedFP = failedFPs[ii];
        report.println(failedFP.getNameWithPhaseExpln());
        filePassSubGen.writeReport(report, failedFP);
        report.println("");
      }
      report.println("");
     
      List successfulFPReports = new ArrayList();
      for (int ii = 0; ii < successfulFPs.length; ii++) {
        FilePassResult successfulFP = successfulFPs[ii];
       
        filePassSubGen.generateSubreport(tr, successfulFP);
        FilePassReport filePassReport = filePassSubGen.getFilePassReport();
       
        successfulFPReports.add(filePassReport);
      }
     
      List failedFPReports = new ArrayList();
      for (int ii = 0; ii < failedFPs.length; ii++) {
        FilePassResult failedFP = failedFPs[ii];
       
        filePassSubGen.generateSubreport(tr, failedFP);
        FilePassReport filePassReport = filePassSubGen.getFilePassReport();
       
        failedFPReports.add(filePassReport);
View Full Code Here

  private static Converter[] determineWhichAreTrusted(AllTestsResult atr) {
      TestResult[] trs =  atr.getTestResults();
     
      Set trustedConverters = new HashSet();
      for (int ii = 0; ii < trs.length; ii++) {
        TestResult tr = trs[ii];
        FilePassResult[] fprs = tr.getFilePassResults();
       
       
        //determine which converters always succeeded.
       
        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;
            }
          }
         
        }
       
        Converter[] allConvs = tr.getAllConverters();
        ConverterPath testConvs = tr.getTestConverters();
        if (fprs.length > 0) {
          //mark trusted converters.
           
          for (int kk = 0; kk < testConvs.size(); kk++) {
            Converter c = testConvs.get(kk);
View Full Code Here

    Map convToTestsToPasses = new HashMap();
    initialize(convToTestsToPasses, allConvs);
   
    //for each test...
    for (int ii = 0; ii < trs.length; ii++) {
      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();
View Full Code Here

  }
 
  private static void addPassResult(Map convToTestsToPasses, Converter conv,
      FilePassResult pass) {
   
    TestResult test = pass.getParent();
   
    Map testToPasses = (Map) convToTestsToPasses.get(conv);
    List passes;
   
    //if we already associated this test with the converter...
View Full Code Here

        report.println("");

        report.println("Involved in the following tests...");
        TestResult[] involvedTests = cr.getTestsBySuccess();
        for (int ii = 0; ii < involvedTests.length; ii++) {
          TestResult tr = involvedTests[ii];
          report.println("  " + tr.getNameWithSuccess());
        }
        report.println("");

        ChanceAtFault[] failureExplns = cr
            .getUniqueExplnChanceAtFaults();
View Full Code Here

      report.println("");
     
      TestResult[] passedTRs = atr.getPassedTestResults();
      report.println("Completely Passed Tests...");
      for (int ii = 0; ii < passedTRs.length; ii++) {
        TestResult passedTR = passedTRs[ii];
        report.println("  " + passedTR.getNameWithSuccess());
      }
      report.println("");
     
      TestResult[] pPassedTRs = atr.getPartialPassedTestResults();
      report.println("Partially Passed Tests...");
      for (int ii = 0; ii < pPassedTRs.length; ii++) {
        TestResult pPassedTR = pPassedTRs[ii];
        report.println("  " + pPassedTR.getNameWithSuccess());
      }
     
      report.println("");
     
      report.println("Completely Failed Tests...");
      TestResult[] failedTRs = atr.getFailedTestResults();
      for (int ii = 0; ii < failedTRs.length; ii++) {
        TestResult failedTR = failedTRs[ii];
        report.println("  " + failedTR.getNameWithSuccess());
      }
      report.println("");
     
      List passedTRReports = new ArrayList();
      for (int ii = 0; ii < passedTRs.length; ii++) {
        TestResult passedTR = passedTRs[ii];
       
        this.testResultSubGen.generateSubreport(passedTR);
        TestReport testReport = testResultSubGen.getTestReport();
       
        passedTRReports.add(testReport);
      }
     
      List pPassedTRReports = new ArrayList();
      for (int ii = 0; ii < pPassedTRs.length; ii++) {
        TestResult pPassedTR = pPassedTRs[ii];
       
        this.testResultSubGen.generateSubreport(pPassedTR);
        TestReport testReport = testResultSubGen.getTestReport();
       
        pPassedTRReports.add(testReport);
      }
     
      List failedTRReports = new ArrayList();
      for (int ii = 0; ii < failedTRs.length; ii++) {
        TestResult failedTR = failedTRs[ii];
       
        this.testResultSubGen.generateSubreport(failedTR);
        TestReport testReport = testResultSubGen.getTestReport();
       
        failedTRReports.add(testReport);
View Full Code Here

TOP

Related Classes of org.cishell.testing.convertertester.core.tester2.ConvResultMaker

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.