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

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


            
             //initialize all the report generators
            
             AllTestsReportGenerator       allGen     =
               new AllTestsReportGenerator(this.log);
             AllConvsReportGenerator       allConvGen =
               new AllConvsReportGenerator(this.log);
             AllErrorReportGenerator      allErrGen  =
               new AllErrorReportGenerator(this.log);
             GraphReportGenerator origGraphGen        =
               new GraphReportGenerator(this.log);
             AnnotatedGraphReportGenerator graphGen   =
               new AnnotatedGraphReportGenerator(this.log);
             ReadMeReportGenerator         readmeGen  =
               new ReadMeReportGenerator(this.log);
            
             /*
              * execute the tests, and provide the results to the
              * report generators
              */
            
             System.out.println("Executing tests...");
            
             ConverterTester2 ct = new ConverterTester2(log);
        
             if (testAllConvs) {
               ct.execute(convRefs,
                   new ReportGenerator[]
                      {allGen, allConvGen, allErrGen,
                   graphGen, origGraphGen, readmeGen},
                   cContext, bContext,
                   new HopFilter(numHops));
             } else {
               ct.execute(convRefs,
                   new ReportGenerator[]
                      {allGen, allConvGen, allErrGen,
                   graphGen, origGraphGen, readmeGen},
                   cContext, bContext,
                   new ConvAndHopFilter(selectedConvName, numHops));
             }
             /*
              * report generators have now been supplied with the test
              * results, and their reports can now be extracted.
              */
            
             System.out.println("Returning reports...");
            
             //return readme report
            
             ReadMeReport readmeReport = readmeGen.getReadMe();
             File readmeFile = readmeReport.getReportFile();
             Data readMeData = createReportData(readmeFile,
                 readmeReport.getName(), null);
             addReturn(readMeData);
            
             //return all converters report
            
             AllConvsReport allConvReport =
               allConvGen.getAllConvsReport();
             File allConvReportFile = allConvReport.getReport();
             Data allConvReportData =
               createReportData(allConvReportFile,
                   allConvReport.getName(),
                 null);
View Full Code Here


            
             AllTestsReportGenerator       allGen     =
               new AllTestsReportGenerator(this.log);
             AllConvsReportGenerator       allConvGen =
               new AllConvsReportGenerator(this.log);
             AllErrorReportGenerator      allErrGen  =
               new AllErrorReportGenerator(this.log);
             GraphReportGenerator origGraphGen        =
               new GraphReportGenerator(this.log);
             AnnotatedGraphReportGenerator graphGen   =
               new AnnotatedGraphReportGenerator(this.log);
             ReadMeReportGenerator         readmeGen  =
               new ReadMeReportGenerator(this.log);
            
             /*
              * execute the tests, and provide the results to the
              * report generators
              */
            
             System.out.println("Executing tests...");
            
             ConverterTester2 ct = new ConverterTester2(log);
        
             if (testAllConvs) {
               ct.execute(convRefs,
                   new ReportGenerator[]
                      {allGen, allConvGen, allErrGen,
                   graphGen, origGraphGen, readmeGen},
                   cContext, bContext,
                   new HopFilter(numHops));
             } else {
               ct.execute(convRefs,
                   new ReportGenerator[]
                      {allGen, allConvGen, allErrGen,
                   graphGen, origGraphGen, readmeGen},
                   cContext, bContext,
                   new ConvAndHopFilter(selectedConvName, numHops));
             }
             /*
              * report generators have now been supplied with the test
              * results, and their reports can now be extracted.
              */
            
             System.out.println("Returning reports...");
            
             //return readme report
            
             ReadMeReport readmeReport = readmeGen.getReadMe();
             File readmeFile = readmeReport.getReportFile();
             Data readMeData = createReportData(readmeFile,
                 readmeReport.getName(), null);
             addReturn(readMeData);
            
             //return all converters report
            
             AllConvsReport allConvReport =
               allConvGen.getAllConvsReport();
             File allConvReportFile = allConvReport.getReport();
             Data allConvReportData =
               createReportData(allConvReportFile,
                   allConvReport.getName(),
                 null);
             addReturn(allConvReportData);
            
             ConvReport[] convReports =
               allConvReport.getConverterReports();
             for (int ii = 0; ii < convReports.length; ii++) {
               ConvReport convReport = convReports[ii];
               File convReportFile = convReport.getReport();
               Data convReportData =
                 createReportData(convReportFile,
                     convReport.getName(), allConvReportData);
               addReturn(convReportData);
              
               TestReport[] trs = convReport.getTestReports();
               addFilePasses(trs, convReportData);
             }
            
             //return all tests report
            
             AllTestsReport allReport = allGen.getAllTestsReport();
             File allReportFile = allReport.getAllTestsReport();
             Data allReportData = createReportData(allReportFile,
                 allReport.getName() , null);
             addReturn(allReportData);
            
             TestReport[] sTestReports =
               allReport.getSuccessfulTestReports();
             addFilePasses(sTestReports, allReportData);
            
             TestReport[] ppTestReports =
               allReport.getPartialSuccessTestReports();
             addFilePasses(ppTestReports, allReportData);
            
             TestReport[] fTestReports =
               allReport.getFailedTestReports();
             addFilePasses(fTestReports, allReportData);
            
             //return all errors report
            
             AllErrorReport allErrorReport =
               allErrGen.getAllErrorsReport();
             File allErrReportFile = allErrorReport.getReportFile();
             Data allErrReport = createReportData(allErrReportFile,
                 allErrorReport.getName(), null);
             addReturn(allErrReport);
            
View Full Code Here

          this.errSourceAnalyzer.analyze(testToPassesToCafs);
       
        report.println("--Error Source Analysis Summary--");
       
        for (int jj = 0; jj < errSources.length; jj++) {
          ErrorSource errSource = errSources[jj];
         
          report.println("");
         
          ChanceAtFault[] overallCafs = errSource.getCulprits();
         
          if (overallCafs.length > 0) {
          report.println(errSource.getComment());
         
          Arrays.sort(overallCafs,
              ChanceAtFault.COMPARE_BY_LIKELIHOOD);
         
          for (int kk = 0; kk < overallCafs.length; kk++) {
View Full Code Here

            

            
             //initialize all the report generators
            
             AllTestsReportGenerator       allGen     =
               new AllTestsReportGenerator(this.log);
             AllConvsReportGenerator       allConvGen =
               new AllConvsReportGenerator(this.log);
             AllErrorReportGenerator      allErrGen  =
               new AllErrorReportGenerator(this.log);
             GraphReportGenerator origGraphGen        =
               new GraphReportGenerator(this.log);
             AnnotatedGraphReportGenerator graphGen   =
               new AnnotatedGraphReportGenerator(this.log);
             ReadMeReportGenerator         readmeGen  =
               new ReadMeReportGenerator(this.log);
            
             /*
              * execute the tests, and provide the results to the
              * report generators
              */
            
             System.out.println("Executing tests...");
            
             ConverterTester2 ct = new ConverterTester2(log);
        
             if (testAllConvs) {
               ct.execute(convRefs,
                   new ReportGenerator[]
                      {allGen, allConvGen, allErrGen,
                   graphGen, origGraphGen, readmeGen},
                   cContext, bContext,
                   new HopFilter(numHops));
             } else {
               ct.execute(convRefs,
                   new ReportGenerator[]
                      {allGen, allConvGen, allErrGen,
                   graphGen, origGraphGen, readmeGen},
                   cContext, bContext,
                   new ConvAndHopFilter(selectedConvName, numHops));
             }
             /*
              * report generators have now been supplied with the test
              * results, and their reports can now be extracted.
              */
            
             System.out.println("Returning reports...");
            
             //return readme report
            
             ReadMeReport readmeReport = readmeGen.getReadMe();
             File readmeFile = readmeReport.getReportFile();
             Data readMeData = createReportData(readmeFile,
                 readmeReport.getName(), null);
             addReturn(readMeData);
            
             //return all converters report
            
             AllConvsReport allConvReport =
               allConvGen.getAllConvsReport();
             File allConvReportFile = allConvReport.getReport();
             Data allConvReportData =
               createReportData(allConvReportFile,
                   allConvReport.getName(),
                 null);
             addReturn(allConvReportData);
            
             ConvReport[] convReports =
               allConvReport.getConverterReports();
             for (int ii = 0; ii < convReports.length; ii++) {
               ConvReport convReport = convReports[ii];
               File convReportFile = convReport.getReport();
               Data convReportData =
                 createReportData(convReportFile,
                     convReport.getName(), allConvReportData);
               addReturn(convReportData);
              
               TestReport[] trs = convReport.getTestReports();
               addFilePasses(trs, convReportData);
             }
            
             //return all tests report
            
             AllTestsReport allReport = allGen.getAllTestsReport();
             File allReportFile = allReport.getAllTestsReport();
             Data allReportData = createReportData(allReportFile,
                 allReport.getName() , null);
             addReturn(allReportData);
            
View Full Code Here

               new AllConvsReportGenerator(this.log);
             AllErrorReportGenerator      allErrGen  =
               new AllErrorReportGenerator(this.log);
             GraphReportGenerator origGraphGen        =
               new GraphReportGenerator(this.log);
             AnnotatedGraphReportGenerator graphGen   =
               new AnnotatedGraphReportGenerator(this.log);
             ReadMeReportGenerator         readmeGen  =
               new ReadMeReportGenerator(this.log);
            
             /*
              * execute the tests, and provide the results to the
              * report generators
              */
            
             System.out.println("Executing tests...");
            
             ConverterTester2 ct = new ConverterTester2(log);
        
             if (testAllConvs) {
               ct.execute(convRefs,
                   new ReportGenerator[]
                      {allGen, allConvGen, allErrGen,
                   graphGen, origGraphGen, readmeGen},
                   cContext, bContext,
                   new HopFilter(numHops));
             } else {
               ct.execute(convRefs,
                   new ReportGenerator[]
                      {allGen, allConvGen, allErrGen,
                   graphGen, origGraphGen, readmeGen},
                   cContext, bContext,
                   new ConvAndHopFilter(selectedConvName, numHops));
             }
             /*
              * report generators have now been supplied with the test
              * results, and their reports can now be extracted.
              */
            
             System.out.println("Returning reports...");
            
             //return readme report
            
             ReadMeReport readmeReport = readmeGen.getReadMe();
             File readmeFile = readmeReport.getReportFile();
             Data readMeData = createReportData(readmeFile,
                 readmeReport.getName(), null);
             addReturn(readMeData);
            
             //return all converters report
            
             AllConvsReport allConvReport =
               allConvGen.getAllConvsReport();
             File allConvReportFile = allConvReport.getReport();
             Data allConvReportData =
               createReportData(allConvReportFile,
                   allConvReport.getName(),
                 null);
             addReturn(allConvReportData);
            
             ConvReport[] convReports =
               allConvReport.getConverterReports();
             for (int ii = 0; ii < convReports.length; ii++) {
               ConvReport convReport = convReports[ii];
               File convReportFile = convReport.getReport();
               Data convReportData =
                 createReportData(convReportFile,
                     convReport.getName(), allConvReportData);
               addReturn(convReportData);
              
               TestReport[] trs = convReport.getTestReports();
               addFilePasses(trs, convReportData);
             }
            
             //return all tests report
            
             AllTestsReport allReport = allGen.getAllTestsReport();
             File allReportFile = allReport.getAllTestsReport();
             Data allReportData = createReportData(allReportFile,
                 allReport.getName() , null);
             addReturn(allReportData);
            
             TestReport[] sTestReports =
               allReport.getSuccessfulTestReports();
             addFilePasses(sTestReports, allReportData);
            
             TestReport[] ppTestReports =
               allReport.getPartialSuccessTestReports();
             addFilePasses(ppTestReports, allReportData);
            
             TestReport[] fTestReports =
               allReport.getFailedTestReports();
             addFilePasses(fTestReports, allReportData);
            
             //return all errors report
            
             AllErrorReport allErrorReport =
               allErrGen.getAllErrorsReport();
             File allErrReportFile = allErrorReport.getReportFile();
             Data allErrReport = createReportData(allErrReportFile,
                 allErrorReport.getName(), null);
             addReturn(allErrReport);
            
            
             //return annotated graph report
            
             File graphReportFile = graphGen.getGraphReport();
             Data graphReport = createReportData(graphReportFile,
                 "Annotated Converter Graph", null,
                 "file:text/nwb", DataProperty.NETWORK_TYPE);
             addReturn(graphReport);
            
View Full Code Here

               new AllTestsReportGenerator(this.log);
             AllConvsReportGenerator       allConvGen =
               new AllConvsReportGenerator(this.log);
             AllErrorReportGenerator      allErrGen  =
               new AllErrorReportGenerator(this.log);
             GraphReportGenerator origGraphGen        =
               new GraphReportGenerator(this.log);
             AnnotatedGraphReportGenerator graphGen   =
               new AnnotatedGraphReportGenerator(this.log);
             ReadMeReportGenerator         readmeGen  =
               new ReadMeReportGenerator(this.log);
            
             /*
              * execute the tests, and provide the results to the
              * report generators
              */
            
             System.out.println("Executing tests...");
            
             ConverterTester2 ct = new ConverterTester2(log);
        
             if (testAllConvs) {
               ct.execute(convRefs,
                   new ReportGenerator[]
                      {allGen, allConvGen, allErrGen,
                   graphGen, origGraphGen, readmeGen},
                   cContext, bContext,
                   new HopFilter(numHops));
             } else {
               ct.execute(convRefs,
                   new ReportGenerator[]
                      {allGen, allConvGen, allErrGen,
                   graphGen, origGraphGen, readmeGen},
                   cContext, bContext,
                   new ConvAndHopFilter(selectedConvName, numHops));
             }
             /*
              * report generators have now been supplied with the test
              * results, and their reports can now be extracted.
              */
            
             System.out.println("Returning reports...");
            
             //return readme report
            
             ReadMeReport readmeReport = readmeGen.getReadMe();
             File readmeFile = readmeReport.getReportFile();
             Data readMeData = createReportData(readmeFile,
                 readmeReport.getName(), null);
             addReturn(readMeData);
            
             //return all converters report
            
             AllConvsReport allConvReport =
               allConvGen.getAllConvsReport();
             File allConvReportFile = allConvReport.getReport();
             Data allConvReportData =
               createReportData(allConvReportFile,
                   allConvReport.getName(),
                 null);
             addReturn(allConvReportData);
            
             ConvReport[] convReports =
               allConvReport.getConverterReports();
             for (int ii = 0; ii < convReports.length; ii++) {
               ConvReport convReport = convReports[ii];
               File convReportFile = convReport.getReport();
               Data convReportData =
                 createReportData(convReportFile,
                     convReport.getName(), allConvReportData);
               addReturn(convReportData);
              
               TestReport[] trs = convReport.getTestReports();
               addFilePasses(trs, convReportData);
             }
            
             //return all tests report
            
             AllTestsReport allReport = allGen.getAllTestsReport();
             File allReportFile = allReport.getAllTestsReport();
             Data allReportData = createReportData(allReportFile,
                 allReport.getName() , null);
             addReturn(allReportData);
            
             TestReport[] sTestReports =
               allReport.getSuccessfulTestReports();
             addFilePasses(sTestReports, allReportData);
            
             TestReport[] ppTestReports =
               allReport.getPartialSuccessTestReports();
             addFilePasses(ppTestReports, allReportData);
            
             TestReport[] fTestReports =
               allReport.getFailedTestReports();
             addFilePasses(fTestReports, allReportData);
            
             //return all errors report
            
             AllErrorReport allErrorReport =
               allErrGen.getAllErrorsReport();
             File allErrReportFile = allErrorReport.getReportFile();
             Data allErrReport = createReportData(allErrReportFile,
                 allErrorReport.getName(), null);
             addReturn(allErrReport);
            
            
             //return annotated graph report
            
             File graphReportFile = graphGen.getGraphReport();
             Data graphReport = createReportData(graphReportFile,
                 "Annotated Converter Graph", null,
                 "file:text/nwb", DataProperty.NETWORK_TYPE);
             addReturn(graphReport);
            
             //return original graph report
            
             File origGraphReportFile = origGraphGen.getGraphReport();
             Data origGraphReport = createReportData(
                 origGraphReportFile,
                 "Original Converter Graph", null,
                 "file:text/nwb", DataProperty.NETWORK_TYPE);
             addReturn(origGraphReport);
View Full Code Here

       
        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...
View Full Code Here

        if (failureExplns.length > 0) {
          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();
           
            report.println("");
            report.println(explanation);
            report.println("");
            report.println("Chance this converter is responsible: "
View Full Code Here

   * or null if that converter was not involved in this file pass.
   */
  public ChanceAtFault getChanceAtFaultFor(Converter c) {
    Iterator iter = this.chanceAtFaults.iterator();
    while (iter.hasNext()) {
      ChanceAtFault chanceAtFault = (ChanceAtFault) iter.next();
     
      if (chanceAtFault.getConverter() == c) {
        return chanceAtFault;
      }
    }
   
    return null;
View Full Code Here

         
          Arrays.sort(overallCafs,
              ChanceAtFault.COMPARE_BY_LIKELIHOOD);
         
          for (int kk = 0; kk < overallCafs.length; kk++) {
            ChanceAtFault caf = overallCafs[kk];
           
            report.println(caf.getConverter() + " (%" +
                  FormatUtil.
                    formatToPercent(
                        caf.getChanceAtFault()) +
                  " Chance At Fault)");
          }
         
          report.println("");
         
          } else {
            report.println("There is no converter common to all "  +
                "failed file passes with this error.");
            report.println("This most likely means that there is " +
                "more than one source that returns this error" +
                " message.");
            report.println("");
          }
        }
        report.println("--All Error Sources--");
       
        Set tests = testToPassesToCafs.keySet();
       
        Iterator testIter = tests.iterator();
        while (testIter.hasNext()) {
          TestResult test = (TestResult) testIter.next();
         
          report.println(test.getName());
         
          Map passToCafs
            = (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(
                    cafs, involvedConv);
             
              if (associatedCaf.getChanceAtFault() > 0.0f) {
              report.println("    " +
                  involvedConv.getShortName() + " (%" +
                  FormatUtil.formatToPercent(associatedCaf.getChanceAtFault()) +
                  " Chance At Fault)");
              } else {
                report.println("    " +
                    involvedConv.getShortName());
              }
View Full Code Here

TOP

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

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.