Class StackTraceTools


  • public final class StackTraceTools
    extends java.lang.Object
    Functionality to allow tools to analyse and subdivide stack traces.
    Since:
    5.3
    • Method Detail

      • getTestRoot

        public static int getTestRoot​(java.lang.StackTraceElement[] stack,
                                      ITestNGMethod method)
        Parameters:
        stack - The stack trace
        method - The test method
        Returns:
        topmost position of the test method in the stack, or top of stack if method is not in it.
      • getTestNGInstrastructure

        public static java.lang.StackTraceElement[] getTestNGInstrastructure​(java.lang.StackTraceElement[] stack,
                                                                             ITestNGMethod method)
        Parameters:
        stack - The stacktrace
        method - The test method
        Returns:
        topmost position of the test method in the stack, or top of stack if method is not in it.