Mapping proxies to TestObjects
You can extend a proxy so that HCL DevOps Test UI (Test UI) uses a different a TestObject to provide a suitable interface on the scripting side.
Before you begin
com.rational.test.ft.domain.ProxyTestObject
or
Rational.Test.Ft.Domain.ProxyTestObject
members. Canonical
names are string names for fully qualified TestObject class names.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;
}
.
.
}
What to do next
After successfully developing and deploying this proxy code, the control that is being recorded is mapped to the new TestObject. You can verify this by looking at the TestObjectName property under Administrative properties of the TestObject.