public class ScriptUtilities
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CHROME_RUNTIME_ARGS |
protected static FtDebug |
debug
Provides basic run functionality.
|
| Constructor and Description |
|---|
ScriptUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static void |
callScript(RationalTestScript caller,
RationalTestScript callee,
java.lang.Object[] args,
int iterationCount)
This is an internal method used to perform cross datastore calls
and is not to be utilized by users.
|
static java.lang.String |
getOperatingSystemVersion()
Exposes a description of the operating system including version information.
|
static java.lang.String |
getScriptFileName(java.lang.String scriptName,
java.lang.String datastore)
Converts the full class name to the file name
for the program source.
|
static OSProcessInformation |
run(java.lang.String command,
java.lang.String workingDirectory)
Executes the specified command and returns the process information associated with the
created process.
|
static OSProcessInformation |
runJava(java.lang.String main,
java.lang.String classpath,
java.lang.String workingDirectory,
java.lang.String jvm,
java.lang.String jvmOptions)
Provides basic run functionality for a Java program.
|
static boolean |
shellExecute(java.lang.String fileName)
Takes a file name and starts up the program associated with the
file extension.
|
static StartAppInfo |
startApp(Application appl)
Provides start-application functionality.
|
static StartAppInfo |
startApp(Application appl,
java.lang.String symbolicName)
Provides start-application functionality.
|
protected static StartAppInfo |
startApp(Application appl,
java.lang.String[] args,
JVMList jvmList,
BrowserList browserList,
Defaults defaults)
Provides start-application functionality.
|
protected static StartAppInfo |
startApp(Application appl,
java.lang.String symbolicName,
java.lang.String[] args,
JVMList jvmList,
BrowserList browserList,
Defaults defaults)
Provides start-application functionality.
|
static StartAppInfo |
startApp(java.lang.String symbolicName)
Provides start-application functionality.
|
static StartAppInfo |
startApp(java.lang.String symbolicName,
java.lang.String[] args)
Provides start-application functionality.
|
static OSProcessInformation |
startBrowser(java.lang.String url)
Provides basic start-browser functionality.
|
static OSProcessInformation |
startBrowser(java.lang.String browserName,
java.lang.String url)
Starts a specific browser by specifying the logical name.
|
protected static final FtDebug debug
public static final java.lang.String CHROME_RUNTIME_ARGS
public static OSProcessInformation run(java.lang.String command,
java.lang.String workingDirectory)
throws RunException
RunExceptioncommand - the executable file to run. This file is located on the
executable path if a full file name specification is
not provided.workingDirectory - the startup directory for the commandpublic static OSProcessInformation runJava(java.lang.String main,
java.lang.String classpath,
java.lang.String workingDirectory,
java.lang.String jvm,
java.lang.String jvmOptions)
throws RunException
RunExceptionpublic static StartAppInfo startApp(java.lang.String symbolicName)
throws RunException
startApp differs from run and runJava
because the application name is a logical name that is looked up
in the configuration file to map it to the actual details
about how to run the application.RunExceptionsymbolicName - the logical name of the applicationpublic static StartAppInfo startApp(java.lang.String symbolicName,
java.lang.String[] args)
throws RunException
startApp differs from run and runJava
because the application name is a logical name that is looked up
in the configuration file to map it to the actual details
about how to run the application. For example, the configuration file
can specify the location of
the executable file or the location of the main class for Java programs.
This method avoids hard coding details, which may change
from one test machine to another.RunExceptionsymbolicName - the logical name of the applicationargs[] - arguments to pass to the started applicationpublic static StartAppInfo startApp(Application appl)
throws RunException
RunExceptionappl - the applicationargs[] - arguments to pass to the applicationpublic static StartAppInfo startApp(Application appl,
java.lang.String symbolicName)
throws RunException
RunExceptionappl - the applicationsymbolicName - the logical name of the applicationargs[] - arguments to pass to the applicationprotected static StartAppInfo startApp(Application appl,
java.lang.String[] args,
JVMList jvmList,
BrowserList browserList,
Defaults defaults)
throws RunException
RunExceptionappl - the applicationargs - arguments to pass to the applicationjvmList - list of JVMsbrowserList - list of browsersdefaults - default JVM and browserprotected static StartAppInfo startApp(Application appl,
java.lang.String symbolicName,
java.lang.String[] args,
JVMList jvmList,
BrowserList browserList,
Defaults defaults)
throws RunException
RunExceptionappl - the applicationsymbolicName - the logical name of the applicationargs - arguments to pass to the applicationjvmList - list of JVMsbrowserList - list of browsersdefaults - default JVM and browserpublic static OSProcessInformation startBrowser(java.lang.String browserName,
java.lang.String url)
throws RunException
RunExceptionpublic static OSProcessInformation startBrowser(java.lang.String url)
throws RunException
RunExceptionpublic static boolean shellExecute(java.lang.String fileName)
ShellExecute; it is not implemented in UNIX.fileName - the file to pass to Windows ShellExecutetrue when ShellExecute succeedspublic static java.lang.String getScriptFileName(java.lang.String scriptName,
java.lang.String datastore)
public static java.lang.String getOperatingSystemVersion()
String is host dependent.public static void callScript(RationalTestScript caller, RationalTestScript callee, java.lang.Object[] args, int iterationCount)