IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.object.interfaces
Class ProcessTestObject

java.lang.Object   extended by com.rational.test.ft.object.interfaces.TestObject
      extended by com.rational.test.ft.object.interfaces.ProcessTestObject

public class ProcessTestObject
extends TestObject

Provides, in a host-independent manner, access to process information that is specific to the operating system.

Since:
RFT 6.1.1.1

Field Summary
 
Fields inherited from class com.rational.test.ft.object.interfaces.TestObject
ref
 
Constructor Summary
ProcessTestObject(com.rational.test.ft.sys.OSProcessInformation process)
          Constructs a ProcessTestObject from a process.
ProcessTestObject(com.rational.test.ft.object.TestObjectReference ref)
          Constructs a ProcessTestObject from a reference to a TestObject.
 
Method Summary
 boolean exists()
          Returns true if the object is available now, and the process is alive.
 DomainTestObject getDomain()
          Returns the DomainImplementation for the ProcessTestObject.
 long getProcessId()
          Returns the ProcessID The RationalTestScript onObjectNotFound methods are not supported.
 java.util.Hashtable getProperties()
          Returns the Hashtable for the properties of the ProcessTestObject
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns a property of the ProcessTestObject.
 boolean isAlive()
          Checks whether the process is till alive.
 void kill()
          Kills the process
 java.lang.String toString()
          Returns the String discription of the process
 void waitForExistence(double maximum_find_object_time, double find_object_wait_between_retry)
          Wait for the Existence of the Objects
 
Methods inherited from class com.rational.test.ft.object.interfaces.TestObject
compare, compare, compareAndLog, compareAndLog, equals, find, find, find, findAndInvoke, findAndInvoke, findAndInvokeProxy, getActualData, getChildren, getDescribedObject, getDescribedObjects, getDescriptiveName, getField, getIndexer, getIndexer, getIndexers, getMappableChildren, getMappableParent, getMapProperties, getMethods, getNameInScript, getNonValueProperties, getObjectClassName, getObjectCustomClassName, getObjectReference, getOwnedObjects, getOwner, getParent, getProcess, getPropertyFromMap, getRecognitionProperties, getRecognitionPropertyWeight, getScriptCommandFlags, getStandardProperties, getTestData, getTestDataTypes, getTopMappableParent, getTopParent, hashCode, invoke, invoke, invokeProxy, invokeProxy, isMappedObject, isSameObject, isScreenTestObject, isTopLevelTestObject, performTest, performTest, performTest, performTest, setIndexer, setIndexer, setMapProperties, setProperty, unregister, updateTestData, waitForExistence
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessTestObject

public ProcessTestObject(com.rational.test.ft.object.TestObjectReference ref)
Constructs a ProcessTestObject from a reference to a TestObject. This reference must contain a process reference. For internal use.

Since:
RFT 6.1.1.1

ProcessTestObject

public ProcessTestObject(com.rational.test.ft.sys.OSProcessInformation process)
Constructs a ProcessTestObject from a process. For internal use.

Since:
RFT 6.1.1.1
Method Detail

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Returns a property of the ProcessTestObject.

Overrides:
getProperty in class TestObject
Parameters:
propertyName - - The property name whose value we want to get.
Detail description:
This will Returns a property of the ProcessTestObject. The process ID can be accessed as the .pid property.
Example:
This is an example
classicsJava().getProperty("class");
Here classicsJava is of type TopLevelTestObject and i have used the ClassicjavaA as Application under test.
Since:
RFT 6.1.1.1
See Also:
TestObject.unregister(), RationalTestScript.unregisterAll(), RationalTestScript.unregister(Object[]), RationalTestScript.getRegisteredTestObjects()

isAlive

public boolean isAlive()
Checks whether the process is till alive.

Returns:
- true if the process is still alive, false if it has terminated.
Example:
This is an example
ProcessTestObject =classicsJava().getProcess(); ps.isAlive();
Here classicsJava is of type TopLevelTestObject and i have used the ClassicjavaA as Application under test.
Since:
RFT 6.1.1.1

toString

public java.lang.String toString()
Returns the String discription of the process

Overrides:
toString in class TestObject
Returns:
- String representing the ProcessTestObject.
Example:
This is an example
ProcessTestObject =classicsJava().getProcess(); ps.toString();
Here classicsJava is of type TopLevelTestObject and i have used the ClassicjavaA as Application under test.
Since:
RFT 6.1.1.1

getProperties

public java.util.Hashtable getProperties()
Returns the Hashtable for the properties of the ProcessTestObject

Overrides:
getProperties in class TestObject
Returns:
- Hashtable containing the properties of the ProcessTestObject.
Example:
This is an example
ProcessTestObject =classicsJava().getProcess(); ps.getProperties();
Here classicsJava is of type TopLevelTestObject and i have used the ClassicjavaA as Application under test.
Since:
RFT 6.1.1.1

getDomain

public DomainTestObject getDomain()
Returns the DomainImplementation for the ProcessTestObject.

Overrides:
getDomain in class TestObject
Returns:
- DomainTestObject Implementation for the ProcessTestObject.
Example:
This is an example
ProcessTestObject ps =classicsJava().getProcess; ps.getDomain();
Here classicsJava is of type TopLevelTestObject and i have used the ClassicjavaA as Application under test.
Since:
RFT 6.1.1.1

kill

public void kill()
Kills the process

Example:
This is an example
ProcessTestObject ps =classicsJava().getProcess; ps.kill();
Here classicsJava is of type TopLevelTestObject and i have used the ClassicjavaA as Application under test.
Since:
RFT 6.1.1.1

getProcessId

public long getProcessId()
Returns the ProcessID The RationalTestScript onObjectNotFound methods are not supported.

Returns:
- long The process id of the Process.
Example:
This is an example
ProcessTestObject ps =classicsJava().getProcess; ps.getProcessId();
Here classicsJava is of type TopLevelTestObject and i have used the ClassicjavaA as Application under test.
Since:
RFT 6.1.1.1

waitForExistence

public void waitForExistence(double maximum_find_object_time,                              double find_object_wait_between_retry)
Wait for the Existence of the Objects

Overrides:
waitForExistence in class TestObject
Throws:
ObjectNotFoundException
Parameters:
maximum_find_object_time - the maximum amount of time (in seconds) to wait while finding the object
find_object_wait_between_retry - the amount of time (in seconds) to wait between attempts to find the object
Detail description:
Normally, waits until an object exists, but for a process this actually never waits. If the process does not now exist, it never will. Throws an exception if the process has terminated. The RationalTestScript onObjectNotFound methods are not supported.
Example:
This is an example
classicsJava().waitForExistence( 20,20);
Here classicsJava is of type TopLevelTestObject and i have used the ClassicjavaA as Application under test.
Since:
RFT 6.1.1.1
See Also:
isAlive()

exists

public boolean exists()
Returns true if the object is available now, and the process is alive.

Overrides:
exists in class TestObject
Returns:
- true if the object is available now, and the process is alive.
Example:
This is an example
ProcessTestObject =classicsJava().getProcess(); ps.exists();
Here classicsJava is of type TopLevelTestObject and i have used the ClassicjavaA as Application under test.
Since:
RFT 6.1.1.1
See Also:
ClientTestObject