Class JUnitInferrer

    • Constructor Summary

      Constructors 
      Constructor Description
      JUnitInferrer​(java.util.List<java.lang.StackTraceElement> traces)
      Initializes a new inferrer for JUnit.
    • Constructor Detail

      • JUnitInferrer

        public JUnitInferrer​(java.util.List<java.lang.StackTraceElement> traces)
        Initializes a new inferrer for JUnit.
        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 JUnit annotation. Name of package for the class containing the method is used for Project name. Name of class or the @DisplayName annotation (JUnit 5 only) is 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 Junit annotations.
        Specified by:
        inferTestName in interface ReportSettingsInferrer
        Returns:
        A name of the Test.