Package org.testng.internal
Class RuntimeBehavior
- java.lang.Object
-
- org.testng.internal.RuntimeBehavior
-
public final class RuntimeBehavior extends java.lang.Object
This class houses handling all JVM arguments by TestNG
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IGNORE_CALLBACK_INVOCATION_SKIPS
private static java.lang.String
MEMORY_FRIENDLY_MODE
static java.lang.String
PREFERENTIAL_LISTENERS
static java.lang.String
SHOW_TESTNG_STACK_FRAMES
private static java.lang.String
SKIP_CALLER_CLS_LOADER
static java.lang.String
STRICTLY_HONOUR_PARALLEL_MODE
static java.lang.String
SYMMETRIC_LISTENER_EXECUTION
private static java.lang.String
TEST_CLASSPATH
static java.lang.String
TESTNG_DEFAULT_VERBOSE
static java.lang.String
TESTNG_MODE_DRYRUN
static java.lang.String
TESTNG_THREAD_AFFINITY
static java.lang.String
TESTNG_USE_UNSECURED_URL
-
Constructor Summary
Constructors Modifier Constructor Description private
RuntimeBehavior()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
enforceThreadAffinity()
static java.lang.String
getCurrentUserHome()
static java.lang.String
getDefaultDataProviderThreadCount()
static java.lang.String
getDefaultLineSeparator()
static int
getDefaultVerboseLevel()
Returns the default verbosity level if not specified at the suite level.static java.lang.String
getDefaultXmlGenerationImpl()
static java.util.List<java.lang.String>
getPreferentialListeners()
static java.lang.String
getTestClasspath()
static java.util.TimeZone
getTimeZone()
static boolean
ignoreCallbackInvocationSkips()
static boolean
isDryRun()
static boolean
isMemoryFriendlyMode()
static boolean
isTestMode()
static java.lang.String
orderMethodsBasedOn()
static boolean
shouldSkipUsingCallerClassLoader()
static boolean
showTestNGStackFrames()
static boolean
strictParallelism()
static java.lang.String
unsecuredUrlDocumentation()
static boolean
useEmailableReporter()
static boolean
useOldTestNGEmailableReporter()
static boolean
useSecuredUrlForDtd()
static boolean
useStrictParameterMatching()
static boolean
useSymmetricListenerExecution()
-
-
-
Field Detail
-
TESTNG_THREAD_AFFINITY
public static final java.lang.String TESTNG_THREAD_AFFINITY
- See Also:
- Constant Field Values
-
TESTNG_MODE_DRYRUN
public static final java.lang.String TESTNG_MODE_DRYRUN
- See Also:
- Constant Field Values
-
TEST_CLASSPATH
private static final java.lang.String TEST_CLASSPATH
- See Also:
- Constant Field Values
-
SKIP_CALLER_CLS_LOADER
private static final java.lang.String SKIP_CALLER_CLS_LOADER
- See Also:
- Constant Field Values
-
TESTNG_USE_UNSECURED_URL
public static final java.lang.String TESTNG_USE_UNSECURED_URL
- See Also:
- Constant Field Values
-
SHOW_TESTNG_STACK_FRAMES
public static final java.lang.String SHOW_TESTNG_STACK_FRAMES
- See Also:
- Constant Field Values
-
MEMORY_FRIENDLY_MODE
private static final java.lang.String MEMORY_FRIENDLY_MODE
- See Also:
- Constant Field Values
-
STRICTLY_HONOUR_PARALLEL_MODE
public static final java.lang.String STRICTLY_HONOUR_PARALLEL_MODE
- See Also:
- Constant Field Values
-
TESTNG_DEFAULT_VERBOSE
public static final java.lang.String TESTNG_DEFAULT_VERBOSE
- See Also:
- Constant Field Values
-
IGNORE_CALLBACK_INVOCATION_SKIPS
public static final java.lang.String IGNORE_CALLBACK_INVOCATION_SKIPS
- See Also:
- Constant Field Values
-
SYMMETRIC_LISTENER_EXECUTION
public static final java.lang.String SYMMETRIC_LISTENER_EXECUTION
- See Also:
- Constant Field Values
-
PREFERENTIAL_LISTENERS
public static final java.lang.String PREFERENTIAL_LISTENERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
ignoreCallbackInvocationSkips
public static boolean ignoreCallbackInvocationSkips()
-
getPreferentialListeners
public static java.util.List<java.lang.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 java.lang.String unsecuredUrlDocumentation()
-
getDefaultLineSeparator
public static java.lang.String getDefaultLineSeparator()
-
getCurrentUserHome
public static java.lang.String getCurrentUserHome()
-
getDefaultDataProviderThreadCount
public static java.lang.String getDefaultDataProviderThreadCount()
-
getDefaultXmlGenerationImpl
public static java.lang.String getDefaultXmlGenerationImpl()
-
isTestMode
public static boolean isTestMode()
-
shouldSkipUsingCallerClassLoader
public static boolean shouldSkipUsingCallerClassLoader()
-
useStrictParameterMatching
public static boolean useStrictParameterMatching()
-
orderMethodsBasedOn
public static java.lang.String orderMethodsBasedOn()
-
getTestClasspath
public static java.lang.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 andfalse
otherwise.
-
getTimeZone
public static java.util.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 propertyuser.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:- Class @afterClass methods
- Listener onAfterClass methods
-
-