Absent Member.. Absent Member..
Absent Member..

ST/UFT support tip: How use external DLL libraries to a Service Test script?

You can associate libraries as points A and B shows:


A) Associate external reference to Test Script solution

  1. Access the "Tests" pane (left side)
  2. Locate the "References" node:
    "Tests" pane > Solution [test name] > [test name] > References
  3. Rght click
  4. Select "Add Reference" (new dialog appears)
  5. Access desired source of reference

    • GAC. Available references from the %Windir%\assembly (default C:\Windows\Assembly)
    • Projects. References to choose from other ST scripts
    • .NET Assembly Browser. Possible to browser file system for 1 or more DLL files to add as reference
    • COM. Select from all of the available DCOM classes/objects installed on machine.

  6. Click "Ok"

B) Reference new/external namespace from step A to test's coding feature

  1. Open the "TestUserCode.cs" file ("Tests" pane > Solution [test name] > [test name] > TestUserCode.cs)
  2. Navigate to top side of file, under header "namespace Script"
  3. Append at end of the "using ...;" statements, the new namespace:

    namespace Script
    using System
    using System.Xml
    using System.Xml.Schema
    using HP.ST.Ext.BasicActivities;
    using HP.ST.Fwk.RunTimeFWK
    using HP.ST.Fwk.RunTimeFWK.ActivityFWK
    using HP.ST.Fwk.RunTimeFWK.Utilities;
    using HP.ST.Fwk.RunTimeFWK.CompositeActivities
    using System.Windows.Forms
    using HP.ST.Ext.WebServicesActivities

    using MyNamespaceLvl1.MyNamespaceLvl2.MyNamespaceLvl3;

    // ...

You can find this information in this kbarticle


HP support

If you find that this or any post resolves your issue, mark it as an accepted solution.


Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.

Labels (1)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.