Highlighted
Respected Contributor.
Respected Contributor.
490 views

Function Libraries in StormRunner?

How do function libraries work in StormRunner?

 I have multiple sites to test, of which 90% of their scripting will be the same (base platform code is the same across brands).

 It would appear that using function libraries for common code would make the most sense, but I’m not finding how to use them in the StormRunner documentation.

0 Likes
1 Reply
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Hello,

Unfortunately TruClient global function libraries are not supported in StormRunner at the moment. Global function libraries where designed to be saved on shared network drive which is accessible by all Load Generators. Since in StormRunner the Load Generators are located on the cloud they cannot access a shared network drive on your network. We will enhance the feature as soon as we can to fit also the cloud use case.

For now, the workaround is to work with local function libraries. Since the logic is shared among different scripts you will have to copy/paste the function library file from one script to another once one of the copies is updated.

You can "convert" your global function library to a local one by following these steps:

1. Create a local function library in the script where you use the global one

2. Copy the steps from the global function library to the local one

3. Delete the global function library from the script (no worries, it will just remove the library from the script and will not delete the file from the disk)

4. Save the script

5. Now rename the local function library to the same name the global function library had. This will ensure all the references to the functions in the library will become valid

Sorry for the inconvenience 

Regards,

Shlomi

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.