IBM Rational Functional Tester
Version 6.1
IBM Rational Functional Tester API Reference

Project Version 2.0

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

java.lang.Object
  extended bycom.rational.test.ft.object.interfaces.TestObject
      extended bycom.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:
RFT1.0

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 process Id (as a long).
 java.util.Hashtable getProperties()
          Returns a Hashtable containing the properties of the ProcessTestObject.
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns a property of the ProcessTestObject.
 boolean isAlive()
          Returns true if the process is still alive, false if it has terminated.
 void kill()
          Ends the process.
 java.lang.String toString()
          Returns a String representing the ProcessTestObject.
 void waitForExistence(double maximum_find_object_time, double find_object_wait_between_retry)
          Normally, waits until an object exists, but for a process this actually never waits.
 
Methods inherited from class com.rational.test.ft.object.interfaces.TestObject
equals, find, find, find, findAndInvoke, findAndInvoke, findAndInvokeProxy, getChildren, getDescribedObject, getDescribedObjects, getField, getIndexer, getIndexer, getIndexers, getMappableChildren, getMappableParent, getMethods, getNameInScript, getNonValueProperties, getObjectClassName, getObjectReference, getOwnedObjects, getOwner, getParent, getProcess, getPropertyFromMap, getRecognitionProperties, getRecognitionPropertyWeight, getScriptCommandFlags, getStandardProperties, getTestData, getTestDataTypes, getTopMappableParent, getTopParent, invoke, invoke, invokeProxy, invokeProxy, isMappedObject, isSameObject, setIndexer, setIndexer, setProperty, unregister, updateTestData, waitForExistence
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, 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:
RFT1.0

ProcessTestObject

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

Since:
RFT1.0
Method Detail

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Returns a property of the ProcessTestObject. The process ID can be accessed as the .pid property.

Overrides:
getProperty in class TestObject
Parameters:
propertyName - the name of the property
Since:
RFT1.0
See Also:
TestObject.unregister(), RationalTestScript.unregisterAll(), RationalTestScript.unregister(Object[]), RationalTestScript.getRegisteredTestObjects()

isAlive

public boolean isAlive()
Returns true if the process is still alive, false if it has terminated.

Since:
RFT1.0

toString

public java.lang.String toString()
Returns a String representing the ProcessTestObject.

Overrides:
toString in class TestObject
Since:
RFT1.0

getProperties

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

Overrides:
getProperties in class TestObject
Since:
RFT1.0

getDomain

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

Overrides:
getDomain in class TestObject
Since:
RFT1.0

kill

public void kill()
Ends the process.

Since:
RFT1.0

getProcessId

public long getProcessId()
Returns the process Id (as a long).

Since:
RFT1.1

waitForExistence

public void waitForExistence(double maximum_find_object_time,
                             double find_object_wait_between_retry)
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.

Overrides:
waitForExistence in class TestObject
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
Throws:
ObjectNotFoundException
Since:
RFT1.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
Since:
RFT2.1