com.rational.test.ft.domain.java

Class JavaDomainProxy

  • java.lang.Object
    • com.rational.test.ft.sys.RegisteredObject
      • com.rational.test.ft.domain.ProxyTestObject
        • com.rational.test.ft.domain.DomainProxy
          • com.rational.test.ft.domain.java.JavaDomainProxy
  • All Implemented Interfaces:
    com.rational.test.ft.domain.IChannelObject, com.rational.test.ft.domain.IDataDriven, com.rational.test.ft.domain.IProxyBase


    public class JavaDomainProxy
    extends com.rational.test.ft.domain.DomainProxy
    The class for the Java Domain Proxy.
    • Field Summary

      • Fields inherited from class com.rational.test.ft.domain.ProxyTestObject

        BROWSERTABTESTOBJECT_CLASSNAME, BROWSERTESTOBJECT_CLASSNAME, COLORDIALOGTESTOBJECT_CLASSNAME, CROSSDOMAINCONTAINER_CLASSNAME, DOCUMENTTESTOBJECT_CLASSNAME, DOMAINTESTOBJECT_CLASSNAME, ECLIPSETOPLEVELTESTOBJECT_CLASSNAME, EMBEDDEDBROWSERTESTOBJECT_CLASSNAME, FILEDIALOGTESTOBJECT_CLASSNAME, FRAMESUBITEMTESTOBJECT_CLASSNAME, FRAMETESTOBJECT_CLASSNAME, GEFEDITPARTTESTOBJECT_CLASSNAME, GUISUBITEMTESTOBJECT_CLASSNAME, GUITESTOBJECT_CLASSNAME, INTERNALFRAMETESTOBJECT_CLASSNAME, MESSAGEBOXTESTOBJECT_CLASSNAME, PALETTEGUISUBITEMTESTOBJECT_CLASSNAME, PROCESSTESTOBJECT_CLASSNAME, SCROLLSUBITEMTESTOBJECT_CLASSNAME, SCROLLTESTOBJECT_CLASSNAME, SELECTGUISUBITEMTESTOBJECT_CLASSNAME, SELECTSCROLLGUISUBITEMTESTOBJECT_CLASSNAME, SHELLTESTOBJECT_CLASSNAME, STATELESSGUISUBITEMTESTOBJECT_CLASSNAME, SUBITEMTESTOBJECT_CLASSNAME, TABITEMTESTOBJECT_CLASSNAME, TESTOBJECT_CLASSNAME, TEXTGUISUBITEMTESTOBJECT_CLASSNAME, TEXTGUITESTOBJECT_CLASSNAME, TEXTSCROLLTESTOBJECT_CLASSNAME, TEXTSELECTGUISUBITEMTESTOBJECT_CLASSNAME, TIMEOUTTESTOBJECT_CLASSNAME, TOGGLEGUITESTOBJECT_CLASSNAME, TOGGLETESTOBJECT_CLASSNAME, TOPLEVELSUBITEMTESTOBJECT_CLASSNAME, TOPLEVELTESTOBJECT_CLASSNAME, TRACKBARTESTOBJECT_CLASSNAME, vomClippedRectangle
      • Fields inherited from class com.rational.test.ft.sys.RegisteredObject

        theTestObject
      • Fields inherited from interface com.rational.test.ft.domain.IDataDriven

        INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
    • Constructor Summary

      Constructors 
      Constructor and Description
      JavaDomainProxy(java.lang.Object theObjectInTheSUT)
      Sets the SUT object as a member variable for the proxy.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Hashtable getProperties() 
      java.lang.Object getProperty(java.lang.String propertyName)
      Gets the value for a specific property.
      java.util.Hashtable getRecognitionProperties()
      Returns an enumeration of properties used to uniquely identify the associated test object in the SUT.
      int getRecognitionPropertyWeight(java.lang.String propertyName)
      Returns an indication of how useful this property is for recognition.
      java.util.Hashtable getStandardProperties() 
      java.util.Hashtable getTestDataTypes()
      Returns a hashtable of data type descriptions of the verification point data available with the associated object in the SUT.
      java.lang.Object invokeConstructor(java.lang.String className, java.lang.String signature, java.lang.Object[] args)
      Invokes a constructor for a class in the context of the domain.
      java.lang.Object invokeStaticMethod(java.lang.String className, java.lang.String method, java.lang.String signature, java.lang.Object[] args)
      Invokes a static method on a class in the context of the domain.
      void setProperty(java.lang.String propertyName, java.lang.Object value)
      Sets the value for a specific property.
      boolean shouldBeMapped()
      Determines whether the object is interesting from a persistent testability sense and should therefore be added to the object map.
      • Methods inherited from class com.rational.test.ft.domain.DomainProxy

        addRecognitionProperty, getChildren, getDescriptiveName, getImplementationName, getIndexer, getIndexers, getMappableChildren, getMappableParent, getMethods, getMethodSpecForPoint, getName, getNonValueProperties, getOwnedObjects, getOwner, getParent, getTestDomain, getTestObjectClassName, getTopMappableParent, getTopObjects, getTopParent, getUniqueId, hasAddedRecognitionProperties, hasImageVPSupport, prepareDomainsForRecording, prepareToStop, processMouseEvent, readyToStop, setIndexer
      • Methods inherited from class com.rational.test.ft.domain.ProxyTestObject

        addDataDrivableCommands, baseClassMatch, canTakeVP, equals, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChannel, getChildren, getDataDrivableCommand, getDataDrivableCommands, getElementWithFocus, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectClassName, getObjectCustomClassName, getOwnedObjects, getParent, getProxy, getRole, getScriptCommandAnchor, getScriptCommandFlags, getTestData, getVisualClippableParent, getVisualClippedRectangle, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, suppressKeyAction, updateTestData
      • Methods inherited from class com.rational.test.ft.sys.RegisteredObject

        addProxyReference, dereference, getObject, getRegisteredId, getTransactionId, isReferenced, isReleaseRequired, register, registerTransiently, release, toString, unregister
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • JavaDomainProxy

        public JavaDomainProxy(java.lang.Object theObjectInTheSUT)
        Sets the SUT object as a member variable for the proxy. All interactions with the supplied object are performed through this class.
    • Method Detail

      • getTestDataTypes

        public java.util.Hashtable getTestDataTypes()
        Returns a hashtable of data type descriptions of the verification point data available with the associated object in the SUT. The hashtable keys are String objects that are used as the VP type in the associated test data. The type is a simple value that is different from the other type values associated with this object under test. The type keys map to a verbose description of the test data. This is reasonable for presentation to a user.
        Specified by:
        getTestDataTypes in class com.rational.test.ft.domain.ProxyTestObject
        Returns:
        An hashtable of type/description pairs used to describe the verification data available from this proxy.
        See Also:
        ProxyTestObject.getTestData(String), ITestData
      • getRecognitionProperties

        public java.util.Hashtable getRecognitionProperties()
        Returns an enumeration of properties used to uniquely identify the associated test object in the SUT. Examples of excellent recognition properties are the programmatic name or a persistent description. Less interesting are the visible text on a button or label, or the tooltip text, or possibly the foreground color. Uninteresting properties are the transient properties like hasFocus or isShowing type properties.
        Specified by:
        getRecognitionProperties in class com.rational.test.ft.domain.ProxyTestObject
        Returns:
        An enumeration of recognition properties. The returned objects are of class TestObjectProperty.
      • getRecognitionPropertyWeight

        public int getRecognitionPropertyWeight(java.lang.String propertyName)
        Returns an indication of how useful this property is for recognition. A value of 0 indicates not useful at all, and a value of 100 indicates that the property is extremely useful for recognition.
        Specified by:
        getRecognitionPropertyWeight in class com.rational.test.ft.domain.ProxyTestObject
      • getProperties

        public java.util.Hashtable getProperties()
        Specified by:
        getProperties in class com.rational.test.ft.domain.ProxyTestObject
      • getStandardProperties

        public java.util.Hashtable getStandardProperties()
        Specified by:
        getStandardProperties in class com.rational.test.ft.domain.ProxyTestObject
      • getProperty

        public java.lang.Object getProperty(java.lang.String propertyName)
        Gets the value for a specific property.
        Specified by:
        getProperty in class com.rational.test.ft.domain.ProxyTestObject
      • setProperty

        public void setProperty(java.lang.String propertyName,
                                java.lang.Object value)
        Sets the value for a specific property.
        Specified by:
        setProperty in class com.rational.test.ft.domain.ProxyTestObject
      • shouldBeMapped

        public boolean shouldBeMapped()
        Determines whether the object is interesting from a persistent testability sense and should therefore be added to the object map. An object is considered interesting under one or more of the following conditions:
        • Significant user actions can be performed against the object.
        • The object contains testable properties.
        • The object has interesting data associated with it.

        Examples of objects that are not interesting include:
        • Simple container objects with no interesting data.
        • Decorative objects with no interesting side effects.
        • Duplicate objects (mirroring data from another available object).

        Note that if the object is a container, the children are examined even if this method returns false.
        Specified by:
        shouldBeMapped in class com.rational.test.ft.domain.ProxyTestObject
        Returns:
        true if the represented control is interesting other than for nested objects.
        Since:
        RFT1.0
      • invokeStaticMethod

        public java.lang.Object invokeStaticMethod(java.lang.String className,
                                                   java.lang.String method,
                                                   java.lang.String signature,
                                                   java.lang.Object[] args)
        Invokes a static method on a class in the context of the domain. If the returned object is not a value class, invokeStaticMethod returns a reference to the object in the Software Under Test. As always, reference objects should be released by calling one of the unregister methods.
        Overrides:
        invokeStaticMethod in class com.rational.test.ft.domain.DomainProxy
        Since:
        RFT1.0
      • invokeConstructor

        public java.lang.Object invokeConstructor(java.lang.String className,
                                                  java.lang.String signature,
                                                  java.lang.Object[] args)
        Invokes a constructor for a class in the context of the domain. If the returned object is not a value class, invokeConstructor returns a reference to the object in the Software Under Test. As always, reference objects should be released by calling one of the unregister methods. Note that using invokeConstructor to construct a value class object in the SUT is inefficient, because value class objects can be created locally.
        Overrides:
        invokeConstructor in class com.rational.test.ft.domain.DomainProxy
        See Also:
        TestObject#unregister(), RationalTestScript.unregister(Object[]), RationalTestScript.unregisterAll(), RationalTestScript.getRegisteredTestObjects()