Highlighted
Super Contributor.
Super Contributor.
528 views

External library needs to exist on injectors in order to run?

Hi,

We have an generic function library that we use as part of our suite of test scripts.

In globals.h, we are referencing that library via:

#include "Z:\\loadrunner\\lib\\c4_lib.c"

In order for this to work, I physically need Z:\\loadrunner\\lib\\c4_lib.c on each of the injcectors.   I take it the library files are not copied with the script like the paramater data files are?

If it doesn't copy, then I'm a bit skeptical about using a UNC path as I don't want to make my scripts susceptible to network issues if I used the likes of \\\\server\\share\\loadrunner\\lib\\c4_lib.c   I don't like the idea of copying the lib file and making it as part of the script as it defeats the purpose of sharing one common library.

What is the recommended approach when using external libraries?

Cheers,

J

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: External library needs to exist on injectors in order to run?

The most recommended approach is to use a UNC path for this use case.

Regards,

Shlomi

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: External library needs to exist on injectors in order to run?

Hi

We are using a custom built DLL, and  .h file(s) containing functions that make calls to the DLL.

 

We solved it by have a script that is distributing the DLL to the "Loadrunner_installation_folder\bin" and the .h file(s) to "Loadrunner_installation_folder\include" to all loadgenerators (and to local vugen-machines)

Then you in your scripts don't need specify paths, just use

#include "Identifier_UtilityFunctions.h"

or

lr_load_dll("libmySQL.dll");

 

This is working fine, as long there are too frequent updates.

It is also a good tip to have all custum built files share a unique identifier in the filenames, so that you know if a file comes from HP or is your own custom built.

 

br /ola

.
0 Likes
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.