Configuring the Custom Support Set

After developing the implementation for your Custom Server, the OpenText Functional Testing .NET Add-in Extensibility Support Set is ready for configuration and deployment.

The Deployment Workflow

The workflow for deploying a .NET Add-in Extensibility support set consists of the stages shown in the highlighted area of the image. These stages are described in detail in the sections below.

Back to top

Configuring OpenText Functional Testing to Use the Custom Server

To configure OpenText Functional Testing Windows Forms Extensibility, you update the .NET Add-in Extensibility configuration file (SwfConfig.xml). This file is located in the <OpenText Functional Testing installdir>\dat folder, and provides OpenText Functional Testing with the configuration information it needs to load your Custom Servers.

Enter configuration information into the SwfConfig.xml file in one of the following ways:

When configuring OpenText Functional Testing Windows Forms extensibility, define elements according to the coding option you selected for implementing your Custom Server:

When Using a .NET DLL Custom Server

In the SwfConfig.xml file, for each custom .NET control that you implement using a .NET DLL Custom Server, you can define:

  • A MappedTo attribute, if you want the custom control to correspond to a test object other than the default generic test object SwfObject.

  • A CustomRecord element if you want to customize recording on the control.

  • A CustomReplay element if you want to customize how test steps are run on a custom control.

  • A CustomVerify element if you want to add table checkpoint and output value support for custom table controls.

  • A Settings element, in which you can use the Parameter element to pass values to the Custom Server at run-time.

When Using an XML Custom Server

In the SwfConfig.xml file, for each custom .NET control that you implement using an XML Custom Server, you define:

  • A MappedTo attribute, if you want the custom control to correspond to a test object other than the default test grid object SwfTable.

  • The Context attribute of a CustomRecord element if you want to customize recording on the control.

  • The Context attribute of a CustomReplay element if you want to customize how test steps are run on a custom control.

  • A Settings element, in which you can use the Parameter element to pass values to the Custom Server at run-time.

  • Note: OpenText Functional Testing loads the Custom Server when you open a test. Therefore, if you implement your Custom Server as a .NET DLL, any changes you make to the DLL after the Custom Server is loaded take effect only the next time you open a test.

For information on the elements in the .NET Add-in Extensibility configuration file (SwfConfig.xml), see the .NET Add-in Extensibility Configuration Schema Help.

Back to top

Copying Configuration Information Generated by the OpenText Functional Testing Custom Server Settings Wizard

When running the OpenText Functional Testing Custom Server Settings wizard to create a Custom Server, the wizard creates an XML configuration segment. The wizard outputs this segment to help you enter the configuration information in the .NET Add-in Extensibility configuration file.

To incorporate the contents of the XML configuration segment before deploying the Custom Server:

  1. Edit the Configuration.xml segment file in the project to ensure that the information is correct. Set the DllName element value to the location to which you plan to deploy the Custom Server. If Test Record and/or Test Run are to be loaded in different run-time contexts, edit the Context value accordingly.

  2. Copy the entire <Control>...</Control> node. Do not include the enclosing <Controls> tags.

  3. Open the .NET Add-in Extensibility configuration file, <OpenText Functional Testing installdir>\dat\SwfConfig.xml. Paste the Control node from Configuration.xml at the end of the file, before the closing </Controls> tag.

  4. Save the file. If OpenText Functional Testing was open, you must close and reopen it for the SwfConfig.xml changes to take effect.

    Note: You can validate the configuration file you design against the <OpenText Functional Testing installdir>\dat\SwfConfig.xsd file.

Example of a .NET Add-in Extensibility Configuration File

Following is an example of a file that configures OpenText Functional Testing to recognize the following controls:

  • Support for the MyCompany.WinControls.MyListView control is implemented in the CustomMyListView.CustListView .NET DLL Custom Server. The Custom Server is not installed in the GAC, so the DLL name is specified as a path and file name (and is not passed as a type name according to GAC standard syntax).

    MyListView is mapped to the SwfListView test object, and runs in the context of the application being tested.

  • Support for the mySmileyControls.SmileyControl2 control is implemented in an XML file. Therefore, the path and file name for the Control Definition file that contains its implementation is passed to OpenText Functional Testing during run-time using the Parameter element.

    The SmileyControl2 control is not explicitly mapped to any test object in the SwfConfig.xml file, so OpenText Functional Testing maps it to the default generic test object, SwfObject.

  • Customized record and run support for the System.Windows.Forms.DataGridView control is implemented in a .NET DLL Custom Server called CustomMyTable.dll. Table checkpoint and output value support for the System.Windows.Forms.DataGridView control is implemented in a .NET DLL Custom Server called VfySrv.dll.

    DataGridView must be mapped to the SwfTable test object (according to the restrictions imposed by the TableElement complex type element in the schema), and, because the customized support includes table checkpoints and output values, must run in the context of the application being tested.

    <?xml version="1.0" encoding="UTF-8"?>
    <Controls>
    	<Control Type="MyCompany.WinControls.MyListView" MappedTo="SwfListView" > 
    		<CustomRecord> 
    			<Component> 
    				<Context>AUT</Context>
    				<DllName>C:\MyProducts\Bin\CustomMyList View.dll</DllName> 
    				<TypeName>CustomMyListView.CustListView</TypeName> 
    			</Component> 
    		</CustomRecord> 
    		<CustomReplay> 
    			<Component> 
    				<Context>AUT</Context>
    				<DllName>C:\MyProducts\Bin\CustomMyList View.dll</DllName> 
    				<TypeName>CustomMyListView.CustListView</TypeName> 
    			</Component> 
    		</CustomReplay> 
    		<Settings>
    			<Parameter Name="sample name">sample value</Parameter>
    			<Parameter Name="ConfigPath">
    C:\Program Files (x86)\OpenText\UFT One\dat\Extensibility\dotNET\MyContrSIM.xml</Parameter>
    		</Settings>
    	</Control> 
    
    	<Control Type="mySmileyControls.SmileyControl2"> 
    		<Settings>
    			<Parameter Name="ConfigPath">d:\UFT\bin\ConfigSmiley.xml
    			</Parameter>
    		</Settings>
    		<CustomRecord> 
    			<Component> 
    				<Context>AUT-XML</Context>
    			</Component> 
    		</CustomRecord> 
    		<CustomReplay> 
    			<Component> 
    				<Context>AUT-XML</Context>
    			</Component> 
    		</CustomReplay> 
    	</Control> 
    
    	<Control Type="System.Windows.Forms.DataGridView" 
    			MappedTo="SwfTable">
    		<CustomRecord> 
    			<Component> 
    				<Context>QTP</Context>
    				<DllName>C:\MyProducts\Bin\CustomMyTable.dll</DllName> 
    				<TypeName>CustomMyTable.CustTableView</TypeName> 
    			</Component> 
    		</CustomRecord> 
    		<CustomReplay> 
    			<Component> 
    				<Context>AUT-XML</Context>
    			</Component> 
    		</CustomReplay> 
    		<CustomVerify>
    			 <Context>AUT</Context> 
    			 <DllName>C:\MyProducts\Bin\VfySrv.dll</DllName> 
    			 <TypeName>VfySrv.DataGridCPSrv</TypeName> 
    		 </CustomVerify>
    		<Settings>
    			<Parameter Name="sample name">sample value</Parameter>
    		</Settings>
    	</Control>
    
    </Controls>

Back to top