Highlighted
Absent Member.
Absent Member.
381 views

Using shared data files in performance center

We are attempting to use shared login code (and other shared code) between our performance test scripts.  We are using the external HP hosted load generators and have no remote access available.  I am attempting to find a solution using #include to call another file included in a seperate script in the same test run.

 

With the test run, we include a script that has all shared code (call it SharedLogin).  This script should be distributed to all load generators that are included with the test since it is part of the test run.  Then use a #include statement in the normal test scripts to call the code contained within the shared code script.  Something along the lines of this

 

#include "..\SharedLogin\Login.c"

 

However all my attempts thus far have been unsucessful.  I'm not the best with file pathing, but I would imagine that the load generators store all of the scripts together in the temp folder.  I just haven't been able to figure it out yet.

 

It is a huge thorn in our side to update our 50+ scripts any time there is a change in the login code.  I appreciate anyones help or thoughts.  Also, I may be barking up the wrong tree here, if there is another approach to this problem that I have not seen, please share.

 

Thanks,

Matt

0 Likes
4 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Using shared data files in performance center

Hello Matt,

 

You can add the file into the additional files on VuGen, or you can attach it directly into the machine and you can call it using the entire path.

 

On the other hand, on the following link, you can find a documentation about how to include header files in scripts

 

https://softwaresupport.hp.com/group/softwaresupport/search-result/-/facetsearch/document/KM191871 

 

Please note that if the .c file that you are going to call is in a network share folder, there is going to require additional steps.

Regards,

Daniela Gómez Alvarado
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Using shared data files in performance center

You can add the file into the additional files on VuGen

I believe that this will involve copying the file to each of the 50 scripts in ALM each time there is a change.  This doesn't seem any better or worse than what I currently do.

 

or you can attach it directly into the machine and you can call it using the entire path.

We are using externally hosted (by HP) load generators.  Correct me if I am wrong, but remote access is not granted to these machines and I cannot copy the file to the load generators.

 

The external hosting also rules out a network share option.

 

From your linked document:

2. If the header file is in the script folder, you need to add the following to the beginning of the script:

    #include <my_header_file.h>

From the script directory open .usr file with a notepad.
Then, add the file under the [ExtraFiles] section of the script's .usr file and save it.Example:

[ExtraFiles]
my_header_file.h=

This will show the header file listed in the Controller as the file to transfer to remote LoadGenerator. Right-click on the script and select Details -> More -> Files in the Controller Design view. If you still do not see the file, click on "Add" to add the header file.

 

This seems promising, but I still do not see a way to have other scripts reference the file.

 

Thank you for the help, and maybe I am misunderstanding one of these solutions, but I am not seeing a way to acomplish a shared action/code with our current setup.

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Using shared data files in performance center

We do pretty much exactly what you're talking about. We have a Login function that we reference across 100s of scripts and include it in the Globals.h section of the script. Change to the login? Just change the function and your 100s of scripts login fine.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Using shared data files in performance center

Not sure I understand correctly, but if a part of the script is shared between the scripts, consider the following possible solution for Performance Center:

  1. Place the common part of the scripts to a folder visible by all of the LGs
  2. Change your PC system account (if not done yet) to be domain account. The default account IUSR_METRO is nota  domain account. For doing this you will need a help of your domain admin
  3. Add permissions to your Performance Center System User created in step 2 to have read access to the shared folders. This also need to be done by sn admin
IvoHri
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.