How to script "uploading a file"

I have a step in the scripting where I upload an image file (.jpeg) to an web site, that image file is located on my hard drive (at D: drive).

The script runs without any error while running with VuGen locally. But I wanted to know what changes should I need to do before transferring the script to the Performance Center ? Performance Center doesn't have any "D:" drive concept.

Should I put that image file (.jpeg) at any special place or any other technique I need to follow for executing the script ?
  • You need to upload the file to the load generators that you will be using in test run and change the path accordingly.
    Path local to that load generator.
  • You need to open your script and go to File > Add Files to Script in your Vugen. Now browse and select your file. Once the file is added, the name of the file will be reflected on the left pane of your Vugen and also the file will get added to your script folder. Once this is done, you simply have to specify the name of the file in your upload action like test.jpeg. You can remove the absolute path of the jpeg from your script as this method will access your script folder only.

    When you do it in the above method, it helps you avoid the exercise of copying the files to your loadgenerators before each run etc. This way the file will be part of your script folder and hence will be travelling along with your script.

    Hope this helps

    Thanks
    Prashanth T
  • Hi,

    I don't have an answer for your Performance Center question but I am interested in the first part of your post.

    I have been unable to script the file upload in VuGen. I tried a few protocols but have not been able to make it work.

    Can you help?

    Thanks.