Class TestNGInferrer

    • Constructor Detail

      • TestNGInferrer

        public TestNGInferrer​(java.util.List<java.lang.StackTraceElement> traces)
        Initializes a new inferrer for TestNG.
        Parameters:
        traces - Stack traces list to analyze.
    • Method Detail

      • inferReportSettings

        public ReportSettings inferReportSettings()
        Infers Project and Job names from JUnit annotations.

        SDK analyzes the call stack, searching for a method annotated with TestNG annotation. Name of package for the class containing the method is used for Project name. Name of class or the description_ field from @BeforeSuite / @BeforeClass annotations if found, are used for the Job name

        Specified by:
        inferReportSettings in interface ReportSettingsInferrer
        Returns:
        An instance of ReportSettings containing Project and Job names.
      • inferTestName

        public java.lang.String inferTestName()
        Infers Test name using TestNG annotations.
        Specified by:
        inferTestName in interface ReportSettingsInferrer
        Returns:
        A name of the Test.