Mapping proxies to TestObjects
You can extend a proxy so that Rational® Functional Tester uses a different a TestObject to provide a suitable interface on the scripting side.
Before you begin
Note: Rational® Functional Tester contains a
set of TestObjects with predefined methods that you can reuse while creating
new proxies. Rational® Functional Tester defined TestObjects
have canonical names that are associated with them. For the complete list
of predefined TestObjects and their associated canonical names, see the
com.rational.test.ft.domain.ProxyTestObject
or Rational.Test.Ft.Domain.ProxyTestObject
members. Canonical names are string names for fully qualified TestObject
class names.You can extend the proxy methods that are listed in Extensible methods for mapping proxies to TestObjects:
Java | .Net |
---|---|
String getTestObjectClassName() | String GetTestObjectClassName() |
The GetTestObjectClassName()
returns the canonical
name of the TestObject that needs to be mapped for a proxy. The TestObject
can be either a new or existing TestObject.
The following Java™ sample
returns the canonical name of the TestObject as TOGGLEGUITESTOBJECT_CLASSNAME
:
Example
import com.rational.test.ft.domain.*;
public class someProxy extends baseProxy
{
.
.
public String getTestObjectClassName()
{
return ProxyTestObject.TOGGLEGUITESTOBJECT_CLASSNAME;
}
.
.
}
The following .Net sample returns the canonical name of the
TestObject as TOGGLEGUITESTOBJECT_CLASSNAME
:
using Rational.Test.Ft.Domain;
public class AnyProxy:BaseProxy
{
.
.
.
public override String GetTestObjectClassName()
{
return ProxyTestObject.TOGGLEGUITESTOBJECT_CLASSNAME;
}
.
.
}