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>
이 맵핑을 사용하여 Functional Tester는 발견한 모든 JFormattedTextField Java UI 제어에 사용할 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>
예를 들어, 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>
모든 구문 또는 사용법에 대한 설명은 C:\Program Files\IBM\SDP70\FunctionalTester\bin에 있는 사용자 정의 파일 rational_ft.rftcust를 참조하십시오. 이 파일에는 Functional Tester를 사용하여 전달된 모든 ProxyObject에 맞는 맵핑 항목이 들어 있습니다.