Class RuntimeBehavior

java.lang.Object
org.testng.internal.RuntimeBehavior

public final class RuntimeBehavior extends Object
This class houses handling all JVM arguments by TestNG
  • Field Details

  • Constructor Details

    • RuntimeBehavior

      private RuntimeBehavior()
  • Method Details

    • ignoreCallbackInvocationSkips

      public static boolean ignoreCallbackInvocationSkips()
    • getPreferentialListeners

      public static List<String> getPreferentialListeners()
      Returns:
      - A comma separated list of packages that represent special listeners which users will expect to be executed after executing the regular listeners. Here special listeners can be anything that a user feels should be executed ALWAYS at the end.
    • strictParallelism

      public static boolean strictParallelism()
    • showTestNGStackFrames

      public static boolean showTestNGStackFrames()
    • useSecuredUrlForDtd

      public static boolean useSecuredUrlForDtd()
    • isMemoryFriendlyMode

      public static boolean isMemoryFriendlyMode()
    • unsecuredUrlDocumentation

      public static String unsecuredUrlDocumentation()
    • getDefaultLineSeparator

      public static String getDefaultLineSeparator()
    • getCurrentUserHome

      public static String getCurrentUserHome()
    • getDefaultDataProviderThreadCount

      public static String getDefaultDataProviderThreadCount()
    • getDefaultXmlGenerationImpl

      public static String getDefaultXmlGenerationImpl()
    • isTestMode

      public static boolean isTestMode()
    • shouldSkipUsingCallerClassLoader

      public static boolean shouldSkipUsingCallerClassLoader()
    • useStrictParameterMatching

      public static boolean useStrictParameterMatching()
    • orderMethodsBasedOn

      public static String orderMethodsBasedOn()
    • getTestClasspath

      public static String getTestClasspath()
    • useOldTestNGEmailableReporter

      public static boolean useOldTestNGEmailableReporter()
    • useEmailableReporter

      public static boolean useEmailableReporter()
    • isDryRun

      public static boolean isDryRun()
      Returns:
      - returns true if we would like to run in the Dry mode and false otherwise.
    • getTimeZone

      public static TimeZone getTimeZone()
      Returns:
      - returns the TimeZone corresponding to the JVM argument -Dtestng.timezone if it was set. If not set, it returns the default timezone pertaining to the user property user.timezone
    • enforceThreadAffinity

      public static boolean enforceThreadAffinity()
      Returns:
      - true if we would like to enforce Thread affinity when dealing with the below two variants of execution models:
      • Ordering priority
      • Ordering by dependsOnMethods (will not work with dependency on multiple methods)
    • getDefaultVerboseLevel

      public static int getDefaultVerboseLevel()
      Returns the default verbosity level if not specified at the suite level.
      Returns:
      default XML suite verbosity level, or 1 if property is missing
    • useSymmetricListenerExecution

      public static boolean useSymmetricListenerExecution()
      Returns:
      - true if we would like to invoke AfterClass methods symmetrically to BeforeClass. When true, order is:
      1. Class @afterClass methods
      2. Listener onAfterClass methods
      When false, order is reversed.