package proxysdk.samples.java;
import com.rational.test.ft.domain.java.jfc.JTextProxy;
/**
* @author administrator
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
public class JFormattedTextFieldProxy extends JTextProxy
{
/**
* Sets the SUT object
* as a member variable for the proxy. All interactions with the
* supplied object are performed through this class.
*/
public JFormattedTextFieldProxy(Object theObjectInTheSUT)
{
super(theObjectInTheSUT) ;
}
/*
* TODO: Override more ProxyObject Methods here
*/
}
using Rational.Test.Ft.Domain;
using Rational.Test.Ft.Domain.Net;
namespace ProxySDK.Samples.Net
{
/// <summary>
/// Summary description for MaskedTextProxy.
/// </summary>
public class MaskedTextProxy:TextBoxProxy
{
public MaskedTextProxy(NetTestDomainImplementation domain,
IChannel channel,
System.Object theTestObject): base( domain, channel, theTestObject)
{
}
//
// TODO: Override more ProxyObject Methods here
//
}
}
using Rational.Test.Ft.Domain;
using Rational.Test.Ft.Domain.Win;
namespace ProxySDK.Samples.Win
{
/// <summary>
/// Summary description for StatusBarProxy.
/// </summary>
public class StatusBarProxy:GenericProxy
{
public StatusBarProxy(WinTestDomainImplementation domain,
IChannel channel,
IWinControl theAUTControl): base( domain, channel, theAUTControl)
{
//
// TODO: Add constructor logic here
//
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<ConfigFile L=".ConfigFile">
<Section L=".ConfigFileSection">
<Name>proxies</Name>
<Val L=".ProxyManager">
<DomainImplementation L=".DomainImplementation">
<Name>Java</Name>
<Obj L=".Proxy">
<ClassName>proxysdk.samples.java.JFormattedTextFieldProxy</ClassName>
<Replaces/>
<UsedBy>javax.swing.JFormattedTextField</UsedBy>
</Obj>
</DomainImplementation>
</Val>
</Section>
</ConfigFile>
With this mapping, Functional Tester creates a JFormattedTextFieldProxy instance for every JFormattedTextField Java UI control found.
<?xml version="1.0" encoding="UTF-8"?>
<ConfigFile L=".ConfigFile">
<Section L=".ConfigFileSection">
<Name>proxies</Name>
<Val L=".ProxyManager">
<DomainImplementation L=".DomainImplementation">
<Name>NET</Name>
<Obj L=".Proxy">
<ClassName>[MaskedTextBoxProxy]ProxySDK.Samples.Net.MaskedTextProxy </ClassName>
<Replaces/>
<UsedBy>[System.Windows.Forms]System.Windows.Forms.MaskedTextBox</UsedBy>
</Obj>
</DomainImplementation>
</Val>
</Section>
</ConfigFile>
<?xml version="1.0" encoding="UTF-8"?>
<ConfigFile L=".ConfigFile">
<Section L=".ConfigFileSection">
<Name>proxies</Name>
<Val L=".ProxyManager">
<DomainImplementation L=".DomainImplementation">
<Name>Win</Name>
<Obj L=".Proxy">
<ClassName>[StatusBarProxy]ProxySDK.Samples.Win.StatusBarProxy</ClassName>
<Replaces/>
<UsedBy>STATUSBAR20WNDCLASS</UsedBy>
</Obj>
</DomainImplementation>
</Val>
</Section>
</ConfigFile>
For example, type the following code to create combined.rftcust:
<ConfigFile L=".ConfigFile">
<Section L=".ConfigFileSection">
<Name>proxies</Name>
<Val L=".ProxyManager">
<!-- Add DomainImplementation section for each domain -->
<DomainImplementation L=".DomainImplementation">
<Name>Java</Name>
<Obj L=".Proxy">
<ClassName>proxysdk.samples.java.JFormattedTextFieldProxy</ClassName>
<Replaces/>
<UsedBy>javax.swing.JFormattedTextField</UsedBy>
</Obj>
<!-- Add <Obj L=".Proxy"> section here for each Java proxy mapping -->
</DomainImplementation>
<DomainImplementation L=".DomainImplementation">
<Name>NET</Name>
<Obj L=".Proxy">
<ClassName>[MaskedTextBoxProxy]ProxySDK.Samples.Net.MaskedTextProxy </ClassName>
<Replaces/>
<UsedBy>[System.Windows.Forms]System.Windows.Forms.MaskedTextBox</UsedBy>
</Obj>
<!-- Add <Obj L=".Proxy"> section here for each .NET proxy mapping -->
</DomainImplementation>
<DomainImplementation L=".DomainImplementation">
<Name>Win</Name>
<Obj L=".Proxy">
<ClassName>[StatusBarProxy]ProxySDK.Samples.Win.StatusBarProxy</ClassName>
<Replaces/>
<UsedBy>STATUSBAR20WNDCLASS</UsedBy>
</Obj>
<!-- Add <Obj L=".Proxy"> section here for each Win proxy mapping -->
</DomainImplementation>
</Val>
</Section>
</ConfigFile>
For any syntax or usage clarification, see the customization file rational_ft.rftcust in C:\Program Files\IBM\SDP70\FunctionalTester\bin. This file contains mapping entries for all ProxyObjects that are delivered with Functional Tester.