Examples of DefaultTestReport


Examples of org.apache.batik.test.DefaultTestReport

    /**
     * Runs this test. This method will only throw exceptions if some aspect of
     * the test's internal operation fails.
     */
    public TestReport runImpl() throws Exception {
  DefaultTestReport report = new DefaultTestReport(this);

  try {
      DiffImageTranscoder transcoder =
    new DiffImageTranscoder(getReferenceImage());

      Map hints = createTranscodingHints();
      if (hints != null) {
    transcoder.setTranscodingHints(hints);
      }

      TranscoderInput input = createTranscoderInput();
      transcoder.transcode(input, null);
     
      if (!transcoder.isIdentical()) {
    report.setErrorCode(ERROR_IMAGE_DIFFER);
    report.addDescriptionEntry(ERROR_IMAGE_DIFFER, "");
    report.setPassed(false);
      }
  } catch (TranscoderException ex) {
      report.setErrorCode(ERROR_TRANSCODING);
      report.addDescriptionEntry(ERROR_TRANSCODING, toString(ex));
            ex.printStackTrace();
      report.setPassed(false);
  }
 
  return report;
    }
View Full Code Here

Examples of org.apache.flex.forks.batik.test.DefaultTestReport

        return doc;
    }

   
    public TestReport encode(URL srcURL, FileOutputStream fos) {
        DefaultTestReport report = new DefaultTestReport(this);
        try{
            ImageTranscoder transcoder = getTestImageTranscoder();
            TranscoderInput src = new TranscoderInput(svgURL.toString());
            TranscoderOutput dst = new TranscoderOutput(fos);
            transcoder.transcode(src, dst);
            return null;
        }catch(TranscoderException e){
            StringWriter trace = new StringWriter();
            e.printStackTrace(new PrintWriter(trace));
               
            report.setErrorCode(ERROR_CANNOT_TRANSCODE_SVG);
            report.setDescription(new TestReport.Entry[]{
                new TestReport.Entry
                (Messages.formatMessage(ENTRY_KEY_ERROR_DESCRIPTION, null),
                 Messages.formatMessage(ERROR_CANNOT_TRANSCODE_SVG,
                                        new String[]{svgURL.toString(),
                                                     e.getClass().getName(),
                                                     e.getMessage(),
                                                     trace.toString()
                                        })) });
        }catch(Exception e){
            StringWriter trace = new StringWriter();
            e.printStackTrace(new PrintWriter(trace));

            report.setErrorCode(ERROR_CANNOT_TRANSCODE_SVG);
            report.setDescription(new TestReport.Entry[]{
                new TestReport.Entry
                (Messages.formatMessage(ENTRY_KEY_ERROR_DESCRIPTION, null),
                 Messages.formatMessage(ERROR_CANNOT_TRANSCODE_SVG,
                                        new String[]{svgURL.toString(),
                                                     e.getClass().getName(),
                                                     e.getMessage(),
                                                     trace.toString()
                                        })) });
        }
        report.setPassed(false);
        return report;
    }
View Full Code Here

Examples of org.gradle.api.internal.tasks.testing.junit.report.DefaultTestReport

        TestResultsProvider testResultsProvider = new InMemoryTestResultsProvider(results.values(), testOutputStore.reader());

        try {
            if (testReporter == null) {
                testReporter = new DefaultTestReport();
            }

            JUnitXmlReport junitXml = reports.getJunitXml();
            if (junitXml.isEnabled()) {
                TestOutputAssociation outputAssociation = junitXml.isOutputPerTestCase()
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.