Class StackTraceTools

java.lang.Object
org.testng.reporters.util.StackTraceTools

public final class StackTraceTools extends Object
Functionality to allow tools to analyse and subdivide stack traces.
Since:
5.3
Version:
$Revision: 173 $
Author:
Paul Mendelson
  • Method Details

    • getTestRoot

      public static int getTestRoot(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.
    • getTestNGInfrastructure

      public static StackTraceElement[] getTestNGInfrastructure(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.