IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester Proxy SDK Reference

Project Version 2.3

com.rational.test.ft.domain.java
Class JavaDomainProxy

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

public class JavaDomainProxy
extends 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, 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
JavaDomainProxy(java.lang.Object theObjectInTheSUT)
          Sets the SUT object as a member variable for the proxy.
 
Method Summary
 java.util.Hashtable getProperties()
          Returns a complete set of properties for the associated test object.
 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()
          Returns a complete set of consistent properties for the associated test object.
 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, 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, 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 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 ProxyTestObject
Returns:
An enumeration of recognition properties. The returned objects are of class TestObjectProperty.
See Also:
ProxyTestObject.getRecognitionPropertyWeight(String), ProxyTestObject.getProperty(String), ProxyTestObject.addRecognitionProperty(String,Object,int)

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 ProxyTestObject
Parameters:
propertyName - The name of the recognition property to return a weight value for.
See Also:
ProxyTestObject.getRecognitionProperties()

getProperties

public java.util.Hashtable getProperties()
Description copied from class: ProxyTestObject
Returns a complete set of properties for the associated test object. The meaning of a property is specific to the test domain and the test object. Typically, this is a set of name/value pairs that describe the test object and its active state. Properties such as font, colors, and coordinate information are typically associated with a GUI test object. Associated data and state information can also be returned, depending on the test object.

This method does not return properties whose values are references to objects. The method ProxyTestObject.getNonValueProperties() returns information about such properties.

Specified by:
getProperties in class ProxyTestObject
Returns:
The set of known properties associated with a test object.
See Also:
ProxyTestObject.getProperty(String), ProxyTestObject.setProperty(String,Object), ProxyTestObject.getStandardProperties(), ProxyTestObject.getNonValueProperties()

getStandardProperties

public java.util.Hashtable getStandardProperties()
Description copied from class: ProxyTestObject
Returns a complete set of consistent properties for the associated test object. Consistent properties are those properties that exist regardless of the platform the test object is running on. Domains that do not support the notion of standard properties should implement this method identically to ProxyTestObject.getProperties(). The HTML domain supports standard properties and returns properties that are consistent across browser versions. The Java domain does not support this notion of standard properties. In this domain, getStandardProperties, and getProperties do the same thing. For HTML, standard properties are a subset of the properties returned by getProperties(). The meaning of a property is specific to the test domain and the test object. Typically, this is a set of name/value pairs that describe the test object and its active state. Properties such as font, colors, and coordinate information are typically associated with a GUI test object. Associated data and state information can also be returned, depending on the test object.

Specified by:
getStandardProperties in class ProxyTestObject
Returns:
The set of standard properties associated with a test object.
See Also:
ProxyTestObject.getProperty(String), ProxyTestObject.setProperty(String,Object), ProxyTestObject.getProperties(), ProxyTestObject.getNonValueProperties()

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Gets the value for a specific property.

Specified by:
getProperty in class ProxyTestObject
Parameters:
propertyName - The name of the property to fetch.
Returns:
The active value of the specified property for the associated test object.
See Also:
ProxyTestObject.getProperties(), ProxyTestObject.setProperty(String,Object), ProxyTestObject.getRecognitionProperties(), ProxyTestObject.addRecognitionProperty(String,Object,int)

setProperty

public void setProperty(java.lang.String propertyName,                         java.lang.Object value)
Sets the value for a specific property.

Specified by:
setProperty in class ProxyTestObject
Parameters:
propertyName - The name of the property to redefine. This name is the same as that returned by getProperties().
See Also:
ProxyTestObject.getProperties(), ProxyTestObject.getProperty(String)

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:

Examples of objects that are not interesting include:

Note that if the object is a container, the children are examined even if this method returns false.

Specified by:
shouldBeMapped in class 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 DomainProxy
Since:
RFT1.0
See Also:
TestObject.unregister(), RationalTestScript.unregister(Object[]), RationalTestScript.unregisterAll(), RationalTestScript.getRegisteredTestObjects()

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 DomainProxy
See Also:
TestObject#unregister(), RationalTestScript.unregister(Object[]), RationalTestScript.unregisterAll(), RationalTestScript.getRegisteredTestObjects()