January 2018
Beginner to intermediate
354 pages
7h 59m
English
In cases like this where we want to use dynamic data, it sometimes makes sense to store property settings in global variables or constants that can be used throughout the test run.
Instead of always replacing the placeholders within the test methods, users can do it once in a central location for properties that are used frequently, assign them to a global variable, and then reference them in the test methods.
A good place to assign them is within the common setup class's @BeforeSuite or @BeforeTest methods:
// global variables classpublic class Global_VARS { public static String DEFAULT_URL = null; public static String DEFAULT_USR = null; public static String DEFAULT_PWD = null;}
// common setup class ...
Read now
Unlock full access