Class XMLReporter

  • All Implemented Interfaces:
    IReporter, ITestNGListener

    public class XMLReporter
    extends java.lang.Object
    implements IReporter
    The main entry for the XML generation operation
    • Constructor Detail

      • XMLReporter

        public XMLReporter()
    • Method Detail

      • generateReport

        public void generateReport​(java.util.List<XmlSuite> xmlSuites,
                                   java.util.List<ISuite> suites,
                                   java.lang.String outputDirectory)
        Description copied from interface: IReporter
        Generate a report for the given suites into the specified output directory.
        Specified by:
        generateReport in interface IReporter
      • fileName

        private static java.lang.String fileName()
      • writeReporterOutput

        private void writeReporterOutput​(XMLStringBuffer xmlBuffer)
      • writeSuite

        private void writeSuite​(ISuite suite)
      • writeSuiteToFile

        private void writeSuiteToFile​(java.io.File suiteFile,
                                      ISuite suite)
      • getSuiteAttributes

        private java.util.Properties getSuiteAttributes​(ISuite suite)
      • addDurationAttributes

        public static void addDurationAttributes​(XMLReporterConfig config,
                                                 java.util.Properties attributes,
                                                 java.util.Date minStartDate,
                                                 java.util.Date maxEndDate)
        Add started-at, finished-at and duration-ms attributes to the tag
      • getFileFragmentationLevel

        @Deprecated
        public int getFileFragmentationLevel()
        Deprecated.
        Unused
      • setFileFragmentationLevel

        @Deprecated
        public void setFileFragmentationLevel​(int fileFragmentationLevel)
        Deprecated.
        Unused
      • getStackTraceOutputMethod

        @Deprecated
        public int getStackTraceOutputMethod()
        Deprecated.
        Use #getConfig() instead
      • setStackTraceOutputMethod

        @Deprecated
        public void setStackTraceOutputMethod​(int stackTraceOutputMethod)
        Deprecated.
        Use #getConfig() instead
      • getOutputDirectory

        @Deprecated
        public java.lang.String getOutputDirectory()
        Deprecated.
        Use #getConfig() instead
      • setOutputDirectory

        @Deprecated
        public void setOutputDirectory​(java.lang.String outputDirectory)
        Deprecated.
        Use #getConfig() instead
      • isGenerateGroupsAttribute

        @Deprecated
        public boolean isGenerateGroupsAttribute()
        Deprecated.
        Use #getConfig() instead
      • setGenerateGroupsAttribute

        @Deprecated
        public void setGenerateGroupsAttribute​(boolean generateGroupsAttribute)
        Deprecated.
        Use #getConfig() instead
      • isSplitClassAndPackageNames

        @Deprecated
        public boolean isSplitClassAndPackageNames()
        Deprecated.
        Use #getConfig() instead
      • setSplitClassAndPackageNames

        @Deprecated
        public void setSplitClassAndPackageNames​(boolean splitClassAndPackageNames)
        Deprecated.
        Use #getConfig() instead
      • getTimestampFormat

        @Deprecated
        public java.lang.String getTimestampFormat()
        Deprecated.
        Use #getConfig() instead
      • setTimestampFormat

        @Deprecated
        public void setTimestampFormat​(java.lang.String timestampFormat)
        Deprecated.
        Use #getConfig() instead
      • isGenerateDependsOnMethods

        @Deprecated
        public boolean isGenerateDependsOnMethods()
        Deprecated.
        Use #getConfig() instead
      • setGenerateDependsOnMethods

        @Deprecated
        public void setGenerateDependsOnMethods​(boolean generateDependsOnMethods)
        Deprecated.
        Use #getConfig() instead
      • setGenerateDependsOnGroups

        @Deprecated
        public void setGenerateDependsOnGroups​(boolean generateDependsOnGroups)
        Deprecated.
        Use #getConfig() instead
      • isGenerateDependsOnGroups

        @Deprecated
        public boolean isGenerateDependsOnGroups()
        Deprecated.
        Use #getConfig() instead
      • setGenerateTestResultAttributes

        @Deprecated
        public void setGenerateTestResultAttributes​(boolean generateTestResultAttributes)
        Deprecated.
        Use #getConfig() instead
      • isGenerateTestResultAttributes

        @Deprecated
        public boolean isGenerateTestResultAttributes()
        Deprecated.
        Use #getConfig() instead