Class SurefireReportRenderer

  • All Implemented Interfaces:
    org.apache.maven.reporting.MavenReportRenderer

    public class SurefireReportRenderer
    extends org.apache.maven.reporting.AbstractMavenReportRenderer
    This generator creates HTML Report from Surefire and Failsafe XML Report.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.codehaus.plexus.i18n.I18N i18n  
      private java.lang.String i18nSection  
      private java.util.Locale locale  
      private org.apache.maven.plugins.surefire.report.SurefireReportParser parser  
      private boolean showSuccess  
      private static java.lang.Object[] TAG_TYPE_END  
      private static java.lang.Object[] TAG_TYPE_START  
      private java.util.List<org.apache.maven.plugins.surefire.report.ReportTestSuite> testSuites  
      private java.lang.String xrefLocation  
      • Fields inherited from class org.apache.maven.reporting.AbstractMavenReportRenderer

        sink
    • Constructor Summary

      Constructors 
      Constructor Description
      SurefireReportRenderer​(org.apache.maven.doxia.sink.Sink sink, org.codehaus.plexus.i18n.I18N i18n, java.lang.String i18nSection, java.util.Locale locale, org.apache.maven.plugin.surefire.log.api.ConsoleLogger consoleLogger, boolean showSuccess, java.util.List<java.io.File> reportsDirectories, java.lang.String xrefLocation)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void constructHotLinks()  
      private void constructTestCaseSection​(org.apache.maven.plugins.surefire.report.ReportTestCase testCase)  
      private java.lang.String formatI18nString​(java.lang.String section, java.lang.String key, java.lang.Object... args)  
      private java.lang.String getI18nSection()  
      private java.lang.String getI18nString​(java.lang.String key)  
      private java.lang.String getI18nString​(java.lang.String section, java.lang.String key)  
      java.lang.String getTitle()  
      private java.lang.String javascriptToggleDisplayCode()  
      void renderBody()  
      private void renderSectionFailureDetails()  
      private void renderSectionPackages()  
      private void renderSectionSummary()  
      private void renderSectionTestCases()  
      private void renderSectionTestSuite​(org.apache.maven.plugins.surefire.report.ReportTestSuite suite)  
      private void sinkAnchor​(java.lang.String anchor)  
      private void sinkCellAnchor​(java.lang.String text, java.lang.String anchor)  
      private void sinkIcon​(java.lang.String type)  
      private void sinkLink​(java.lang.String href)  
      private void sinkLink_()  
      private java.lang.String toHtmlId​(java.lang.String id)  
      private java.lang.String toHtmlIdFailure​(org.apache.maven.plugins.surefire.report.ReportTestCase testCase)  
      • Methods inherited from class org.apache.maven.reporting.AbstractMavenReportRenderer

        createLinkPatternedText, endSection, endTable, javaScript, link, linkPatternedText, paragraph, propertiesToString, render, startSection, startTable, startTable, tableCaption, tableCell, tableCell, tableHeader, tableHeaderCell, tableRow, text, verbatimLink, verbatimText
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TAG_TYPE_START

        private static final java.lang.Object[] TAG_TYPE_START
      • TAG_TYPE_END

        private static final java.lang.Object[] TAG_TYPE_END
      • i18n

        private final org.codehaus.plexus.i18n.I18N i18n
      • i18nSection

        private final java.lang.String i18nSection
      • locale

        private final java.util.Locale locale
      • parser

        private final org.apache.maven.plugins.surefire.report.SurefireReportParser parser
      • showSuccess

        private final boolean showSuccess
      • xrefLocation

        private final java.lang.String xrefLocation
      • testSuites

        private final java.util.List<org.apache.maven.plugins.surefire.report.ReportTestSuite> testSuites
    • Constructor Detail

      • SurefireReportRenderer

        public SurefireReportRenderer​(org.apache.maven.doxia.sink.Sink sink,
                                      org.codehaus.plexus.i18n.I18N i18n,
                                      java.lang.String i18nSection,
                                      java.util.Locale locale,
                                      org.apache.maven.plugin.surefire.log.api.ConsoleLogger consoleLogger,
                                      boolean showSuccess,
                                      java.util.List<java.io.File> reportsDirectories,
                                      java.lang.String xrefLocation)
    • Method Detail

      • getTitle

        public java.lang.String getTitle()
        Specified by:
        getTitle in interface org.apache.maven.reporting.MavenReportRenderer
        Specified by:
        getTitle in class org.apache.maven.reporting.AbstractMavenReportRenderer
      • getI18nString

        private java.lang.String getI18nString​(java.lang.String key)
        Parameters:
        key - The key.
        Returns:
        The translated string.
      • getI18nSection

        private java.lang.String getI18nSection()
      • getI18nString

        private java.lang.String getI18nString​(java.lang.String section,
                                               java.lang.String key)
        Parameters:
        section - The section.
        key - The key to translate.
        Returns:
        the translated key.
      • formatI18nString

        private java.lang.String formatI18nString​(java.lang.String section,
                                                  java.lang.String key,
                                                  java.lang.Object... args)
        Parameters:
        section - The section.
        key - The key to translate.
        args - The args to pass to translated string.
        Returns:
        the translated key.
      • renderBody

        public void renderBody()
        Specified by:
        renderBody in class org.apache.maven.reporting.AbstractMavenReportRenderer
      • renderSectionSummary

        private void renderSectionSummary()
      • renderSectionPackages

        private void renderSectionPackages()
      • renderSectionTestSuite

        private void renderSectionTestSuite​(org.apache.maven.plugins.surefire.report.ReportTestSuite suite)
      • renderSectionTestCases

        private void renderSectionTestCases()
      • constructTestCaseSection

        private void constructTestCaseSection​(org.apache.maven.plugins.surefire.report.ReportTestCase testCase)
      • toHtmlId

        private java.lang.String toHtmlId​(java.lang.String id)
      • renderSectionFailureDetails

        private void renderSectionFailureDetails()
      • constructHotLinks

        private void constructHotLinks()
      • toHtmlIdFailure

        private java.lang.String toHtmlIdFailure​(org.apache.maven.plugins.surefire.report.ReportTestCase testCase)
      • sinkIcon

        private void sinkIcon​(java.lang.String type)
      • sinkCellAnchor

        private void sinkCellAnchor​(java.lang.String text,
                                    java.lang.String anchor)
      • sinkAnchor

        private void sinkAnchor​(java.lang.String anchor)
      • sinkLink

        private void sinkLink​(java.lang.String href)
      • sinkLink_

        private void sinkLink_()
      • javascriptToggleDisplayCode

        private java.lang.String javascriptToggleDisplayCode()