Jump to content


Dynamic File Name


  • Please log in to reply
3 replies to this topic

#1 Guest_adoddi@123_*

Guest_adoddi@123_*
  • Guests

Posted 27 October 2011 - 01:47 PM

I have a scenario where i need to pass the values to the request parameters through a file ( i can use CSV or Ordered list) which i am generating dynamically through java script. The problem is that i need to use a different CSV file name (whose content is also different) for each user since the file content is not same for all the users. I am not sure on how to address this issue. Can somebody please help?

#2 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 663 posts

Posted 28 October 2011 - 12:47 PM

In this case you can use JavaScript operator to prepare a data for parameter.
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com

#3 Guest_adoddi@123_*

Guest_adoddi@123_*
  • Guests

Posted 28 October 2011 - 07:19 PM

I might have not articulated the problem correctly!!
I am creating the data and writing it to a file through java script operator (creating a unique file for each user).
But the issue is I am not sure how to read this file using CSV or Order list funtion becuase i can not use a variable in the filename;

I am using the below function for reading the value from file.

$CSV(0,0,Loop_1,C:\Users\Documents\My WAPT Pro\Scenario Files\CSV Files\TestFile.csv)

I want to use a variable instead of "Test.csv" since the file name is different for each user.
Any ideas on how to do this?

#4 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 663 posts

Posted 31 October 2011 - 04:03 AM

Unfortunately you cannot use dynamic file name in CSV function. So you need to use JavaScript operator to read and parse CSV file with dynamic name.
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users