Add/Install a concurrent license key with WlmAdmin

The WlmAdmin utility can be used to add a concurrent license key to an existing license server with the following procedure:

1) Launch WlmAdmin.

2) Open the WlMAdmin utilitiy.

3) Expand the tree view nodes and locate the machine with the License Server where you want to install the concurrent license.

r.

Note:

If you do not see your License Server, you can select "Defined Servers" in the tree. Go to Edit -> Defined Server List. In the "Server" field, enter your License Server machine’s full network name (case-sensitive) or IP address, and click <Add>. Click <OK>. The License Server machine should now be listed.

If you add your server name or your ip and the machine isn’t show in the tree, probably it means that the you have to install or reinstall license server on this machine.

4) Right-click on the machine.

5) Select Add Feature -> From a String in the pop-up menu.

6) Select the "Add feature to server’s file" checkbox.

Note:
If you do not set this checkbox, the license code will not be permanently added to the license server machine.

7) Paste the license key code into the "License code" edit field.

8) Click <Add>.

Advertisements

Considerations – Web Object Identifiers

The considerations of Web Object Identifiers for Unified Functional Testing (UFT) are as follows

General

· Defining xpath and css properties using Frame HTML tags is not supported. This may cause incorrect identification when identifying Frame objects or retrieving Frame objects using the ChildObjects method.

· Xpath and css properties are not supported for .NET Web Forms test objects or for other Web-based test objects that have .NET Web Forms parent test objects.

· When running in Maintenance Mode, UFT may replace test objects with XPath or CSS identifier property values with new objects from the application.

Workaround: Use the Update from Application option in the Object Repository Manager to update specific test objects with XPath or CSS identifier property values.

Differences Between User-Defined XPath and Automatic XPath Behavior During Run Sessions

Behavior in case of… User-defined XPath Automatic XPath
Multiple objects match the XPath value UFT continues to identify the matching objects. UFT ignores the learned XPath and continues with the regular object identification process.
No objects match the XPath value Object identification fails, and UFT continues to identify the object using Smart Identification UFT ignores the learned XPath and continues with the regular object identification process.

Work with controls without learning them into the Object Repository

Programmatic descriptions, also known as "Descriptive Programming" (DP) approach, can be very useful if you want to perform an operation on an object that is not stored in the object repository. You can also use programmatic descriptions in order to perform the same operation on several objects with certain identical properties, or in order to perform an operation on an object whose properties match a description that you determine dynamically during the test run.

The syntax of the programmatic description is

<TestObject>("Property Name1:=Property Value1", "Property Name 2:=Property Value 2")

where TestObject is the class of the test object, and Property Name:=Property Value is the description of the object, separated by commas.

Example: WebEdit("Name:=Author", "Index:=3").Set "Mark Twain"

This line creates a WebEdit test object and sets the description of the object as follows:

  • Name of the object is "Author"
  • Index of the object is "3"

Example:

Window("regexpwndtitle:=Notepad").Dialog("regexpwndtitle:=Find").WinEdit("AttachedText:=Fi&nd what:").Set "hello"

This line creates a Window test object and assigns a child object of type dialog to it. A child of type edit is assigned to the dialog object.

Tip: If there is a need to use the same parent in many script lines it is better to assign the parent object into a variable and use the variable instead.

Example:

‘ Instead of writing
Window("regexpwndtitle:=Notepad").Dialog("regexpwndtitle:=Find").Move 50, 50
Window("regexpwndtitle:=Notepad").Dialog("regexpwndtitle:=Find").WinEdit("AttachedText:=Fi&nd what:").Set "hello"
Window("regexpwndtitle:=Notepad").Dialog("regexpwndtitle:=Find").WinButton("Text:=&Find Next").Click

‘ Write
Set w = Window("regexpwndtitle:=Notepad").Dialog("regexpwndtitle:=Find")
w.Move 50, 50
w.WinEdit("AttachedText:=Fi&nd what:").Set "hello"
w.WinButton("Caption:=Find next").Click

Alternatively, you may use the following format:

With Window("regexpwndtitle:=Notepad").Dialog("regexpwndtitle:=Find")
.Move 50, 50
.WinEdit("AttachedText:=Fi&nd what:").Set "hello"
.WinButton("Text:=&Find Next").Click
End with

Important: One cardinal rule to follow when creating descriptive programming statements is in regards of hierarchy to use (parent/child relationship, who is the parent for X object), if encountering identification problems, HP strongly recommends using the hierarchy displayed by Object Repositories (when objects are captured/recorded/learned for a script/test). Any other order may work or not, unless indicated by HP on special scenarios, the recommendation above is a must.

For more information on using descriptive programming (DP), please refer to the "Programmatic Descriptions" section in the User’s Guide:

  • QTP: Defining Functions and Other Programming Tasks > Working in the Expert View and Function Library Windows
  • UFT: GUI Testing Design > Programming in GUI Testing Documents in the Editor > Concepts

Exclude java application from hooking to QuickTest Professional / Sprinter Java support

When Java Ad-in from QuickTest Professional (QTP), Unified Functional Testing (UFT) or Sprinter, and a java application (for example Lotus Notes Client 8.5.1) are installed on the same machine, even if such HP tools are not used to test such Java Application, such application will crash unexpectedly on startup.

Prevent the Java agent from injecting in the Java Virtual Machine (jvm):

1.Find the process name of the application that is crashing (shown in the Task Manger). For example "notepad.exe"

2.Go to Registry (Start>Run>regedit)

3.Navigate to registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\JavaAgent\Modules

Note: On 64 bits operating system, locate path under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node

4.Create a DWORD value with the same name as the process name of application.

5.Set the value as "0"

Note: The above steps only apply to application that run with .exe (if it’s a jar or bat file, the suggestion will not work).

Run Automation Scripts on a Remote Computer

How to run automation scripts on a remote Unified Functional Testing (UFT) computer. By default, when creating an Application object in the automation script, it is created on the local computer.

1. Set DCOM Configuration Properties on the Remote Computer

UFT automation enables UFT to act as a COM automation server. Therefore, to run a UFT automation script on a remote computer, it must be ensured that the DCOM configuration properties for that computer give the proper permissions to launch and configure the UFT COM server.

The procedure below describes the steps needful to perform on the remote computer to enable automation script to run on that computer. Note that the DCOM Configuration Property the appearance and names of the dialog boxes and options mentioned here may vary depending on the computer’s operating system.

To enable automation scripts to access a Unified Functional Testing computer remotely:

a. On the computer where the automation script will run, select Start > Run. The Run dialog box opens.

b. Enter dcomcnfg and click OK. The Distributed COM Configuration Properties dialog box or the Component Services window opens (depending on operating system) and displays the list of COM applications available on the computer.

c. Select QuickTest Professional Automation from the DCOM Config list and open the Properties dialog box for the application. (Click the Properties button or right-click and select Properties, depending on the operating system.)

d. In the QuickTest Professional Automation Properties dialog box, click the Security tab.

e. In the launch permissions section, select the custom option and click Edit.

f. Use the Add and Remove options to select the network users or groups for which it will be allowed or denied permission to launch UFT via an automation script. When finished, click OK to save the settings.

g. Repeat steps e and f for the configuration permissions section to select the users or groups who can modify UFT configuration options via an automation script.

h. In the QuickTest Professional Automation Properties dialog box, click the Identity tab and select the interactive user option.

i. Click OK to save the QuickTest Professional Automation Properties settings.

j. Click OK to close the Distributed COM Configuration Properties dialog box or the Component Services window.

2. Create an Application Object on the Remote Computer

After setting the necessary DCOM Configuration settings for a remote computer, it can be specified that computer in the application creation script line in the automation script, for example, using the optional location argument in the VBScript CreateObject function.

In VBScript, do this by specifying the computer name as the optional location argument of the CreateObject function. The computer name should be the same as the computer name portion of a share name. For example, to run an automation script on a computer called MyServer, it could written:

Dim qtApp

Set qtApp = CreateObject("QuickTest.Application", "MyServer")

Define Record and Run Settings for Windows-Based Applications

To modify Event Recording Configuration for Web-Based applications in Unified Functional Testing(UFT)

Modify the event recording configuration XML file manually

1. In a text or XML editor, open the appropriate MyEnvEventConfiguration.xml file from the <UFT installation folder>\dat folder, according to the following table:

Object Type: XML File Name
.NET Web Forms WebFormsEventConfiguration.xml
Siebel 7.5 or earlier SiebelEventConfiguration.xml
Siebel 7.7 or later CASEventConfiguration.xml
PeopleSoft Frame objects and all Web objects that are children of a PeopleSoft frame object PSEventConfiguration.xml

2. Edit the file as necessary.

3. Save the file.

Modify the event recording configuration in the Web Event Recording Configuration dialog box

1. Back up the event recording configuration for the Web environment:

a. Select Record > Web Event Recording Configuration. The Web Event Recording Configuration dialog box opens.

b. Click Custom Settings.

c. Select File > Save Configuration As and specify an XML filename for the backup file.

2. Back up the event recording configuration for the environment that need to be modified:

Create a copy of the relevant <MyEnv>EventConfiguration.xml file from the <UFT installation folder>\dat folder.

3. Modify the <MyEnv>EventConfiguration.xml file in the Web Event Recording Configuration dialog box:

a. In the Web Event Recording Configuration dialog box, select File > Load Configuration and browse to the relevant <UFT installation folder>\dat\<MyEnv>EventConfiguration.xml file. The event configuration for the selected environment is displayed in the dialog box.

b. Modify the configuration using the Web Event Recording Configuration dialog box options.

c. Select File > Save Configuration As and overwrite the previous <UFT installation folder>\dat\<MyEnv>EventConfiguration.xml file.

4. Restore the configuration file for the Web environment:

Select File > Load Configuration and browse to the backup copy of the Web configuration file that is saved in step 1.

Caution: UFT always applies the configuration that is loaded in the Web Event Recording Configuration dialog box to all Web objects. If not doing restore the Web configuration file as described in step 4, then UFT will apply the configuration for the file loaded in step 3, and as a result, UFT may not record Web events properly.

Enable Communications between Unified Functional Testing and Delphi Application

The following describes how to:

•Use the MicDelphiAgent.pas module to enable communications between Unified Functional Testing (UFT) and each Delphi project that would be tested.

•Configure support for the TwwDBGrid from InfoPower.

Link to the MicDelphiAgent.pas Module to Enable Communications

It must be performed the following steps for each application that would be tested.

1.Add the <UFT Installation folder>\dat\Extensibility\Delphi folder to the Delphi project search path, or copy the contents of the <UFT Installation folder>\dat\Extensibility\Delphi folder to the project folder.

2.Add MicDelphiAgent to the Uses section of the application’s project file (project.dpr) as shown in the example below:

program flight;

uses

MicDelphiAgent,

Forms,

Windows;

($R*.RES)

begin

Application.Initialize

Application.Title :=’Flight Reservation’;

Application.Run;

end.

3.Compile the Delphi project.

Note: If the application includes the TwwDBGrid from InfoPower, it must be added support for this grid as described below.

Configure Support for TwwDBGrid

If the application includes the TwwDBGrid from InfoPower, do the following to enable support for this grid:

1.Add MicWWSupport to the Uses section of the application’s project file (project.dpr) after MicDelphiAgent, as shown in the example below:

program flight;

uses

MicDelphiAgent,

MicWWSupport,

Forms,

Windows;

($R*.RES)

begin

Application.Initialize

Application.Title :=’Flight Reservation’;

Application.Run;

end.

2.Recompile the application.