com.rational.test.ft.object.interfaces

Class 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
    • 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

      • 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