Class TestNGInferrer
- java.lang.Object
-
- io.testproject.sdk.internal.reporting.inferrers.TestNGInferrer
-
- All Implemented Interfaces:
ReportSettingsInferrer
public class TestNGInferrer extends java.lang.Object implements ReportSettingsInferrer
TestNG inferrer for Project and Job names.
-
-
Constructor Summary
Constructors Constructor Description TestNGInferrer(java.util.List<java.lang.StackTraceElement> traces)
Initializes a new inferrer for TestNG.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReportSettings
inferReportSettings()
Infers Project and Job names from JUnit annotations.java.lang.String
inferTestName()
Infers Test name using TestNG annotations.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.testproject.sdk.internal.reporting.inferrers.ReportSettingsInferrer
getPackageName, getUnnamedEntries
-
-
-
-
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 interfaceReportSettingsInferrer
- 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 interfaceReportSettingsInferrer
- Returns:
- A name of the Test.
-
-