Highlighted
New Member.
1556 views

Setting file path in truclient while running script in controller

hi guys, 
good morning

I need your inputs in getting this issue resolved. 

 I'm recording using truclient protocol. 

I have a scenario where i need to upload a file and hence i used the "set" command to enter the file path (ex: c:\folder1\filename.txt) and the script works fine in vugen. Now that the path is local (local machine path where vugen is installed),  I think it will fail when i run in controller with several lgs.

In that case.. i need to copy that file into the script folder and give the path (that's what i think). If so, how do I mention the path there?

i tried the following but it didn't work.

- \\filename.txt
- \filename.txt didn't work

any ideas? couldn't get much info from the help file or google and hence addressing here⁠⁠⁠⁠.

Cheers,

Prattu

0 Likes
1 Reply
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: Setting file path in truclient while running script in controller

Hi Prattu,

You can achieve this by changing the 'Path' argument type to JavaScript and use the TC.scriptDir property:

TC.scriptDir+"\yourFileName.ext";

Be sure to add the file to the 'Extra Files' tree node in VuGen, to make sure the file is sent to the load-generator along with the script.

Edo

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.