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>
Bei dieser Zuordnung erstellt Functional Tester für jedes gefundene Java-UI-Steuerelement des Typs JFormattedTextField eine Instanz von JFormattedTextFieldProxy.
<?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>
Geben Sie beispielsweise den folgenden Code ein, um combined.rftcust zu erstellen:
<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>
Erläuterungen zur Syntax oder zu deren Verwendung finden Sie in der Anpassungsdatei rational_ft.rftcust unter C:\Program Files\IBM\SDP70\FunctionalTester\bin. Diese Datei enthält Zuordnungseinträge für alle in Functional Tester bereitgestellten Proxyobjekte.