|
IBM Rational Functional Tester Version 8.1.1000 IBM Rational Functional Tester API Reference Project Version 2.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.rational.test.ft.script.ScriptUtilities
public class ScriptUtilities
Defines utility methods. These methods are external so that they can be invoked when not executing in the context of a script, for example, at record time.
Field Summary | |
---|---|
protected static com.rational.test.ft.util.FtDebug |
debug
Provides basic run functionality. |
Constructor Summary | |
---|---|
ScriptUtilities()
|
Method Summary | |
---|---|
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 com.rational.test.ft.sys.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 com.rational.test.ft.sys.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 com.rational.test.ft.util.StartAppInfo |
startApp(com.rational.test.ft.config.Application appl)
Provides start-application functionality. |
protected static com.rational.test.ft.util.StartAppInfo |
startApp(com.rational.test.ft.config.Application appl, java.lang.String[] args, com.rational.test.ft.enabler.JVMList jvmList, com.rational.test.ft.enabler.BrowserList browserList, com.rational.test.ft.util.Defaults defaults)
Provides start-application functionality. |
static com.rational.test.ft.util.StartAppInfo |
startApp(java.lang.String symbolicName)
Provides start-application functionality. |
static com.rational.test.ft.util.StartAppInfo |
startApp(java.lang.String symbolicName, java.lang.String[] args)
Provides start-application functionality. |
static com.rational.test.ft.sys.OSProcessInformation |
startBrowser(java.lang.String url)
Provides basic start-browser functionality. |
static com.rational.test.ft.sys.OSProcessInformation |
startBrowser(java.lang.String browserName, java.lang.String url)
Starts a specific browser by specifying the logical name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static com.rational.test.ft.util.FtDebug debug
Constructor Detail |
---|
public ScriptUtilities()
Method Detail |
---|
public static com.rational.test.ft.sys.OSProcessInformation run(java.lang.String command, java.lang.String workingDirectory) throws RunException
RunException
command
- 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 command public static com.rational.test.ft.sys.OSProcessInformation runJava(java.lang.String main, java.lang.String classpath, java.lang.String workingDirectory, java.lang.String jvm, java.lang.String jvmOptions) throws RunException
RunException
public static com.rational.test.ft.util.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.
RunException
symbolicName
- the logical name of the applicationpublic static com.rational.test.ft.util.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.
RunException
symbolicName
- the logical name of the applicationargs[]
- arguments to pass to the started applicationpublic static com.rational.test.ft.util.StartAppInfo startApp(com.rational.test.ft.config.Application appl) throws RunException
RunException
appl
- the applicationargs[]
- arguments to pass to the applicationprotected static com.rational.test.ft.util.StartAppInfo startApp(com.rational.test.ft.config.Application appl, java.lang.String[] args, com.rational.test.ft.enabler.JVMList jvmList, com.rational.test.ft.enabler.BrowserList browserList, com.rational.test.ft.util.Defaults defaults) throws RunException
RunException
appl
- the applicationargs
- arguments to pass to the applicationjvmList
- list of JVMsbrowserList
- list of browsersdefaults
- default JVM and browserpublic static com.rational.test.ft.sys.OSProcessInformation startBrowser(java.lang.String browserName, java.lang.String url) throws RunException
RunException
public static com.rational.test.ft.sys.OSProcessInformation startBrowser(java.lang.String url) throws RunException
RunException
public static boolean shellExecute(java.lang.String fileName)
ShellExecute
; it is not implemented in UNIX.
fileName
- the file to pass to Windows ShellExecute
true
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |