Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-jmeter Wiki" 
for change notification.

The following page has been changed by JMeterAdmin:
http://wiki.apache.org/jakarta-jmeter/JMeterFAQ

The comment on the change is:
Clarify SFF example

------------------------------------------------------------------------------
  
  if you omit the value, it defaults to 1
  
- == How do I use external data files to in my Test scripts? ==
+ == How do I use external data files to define variables in my Test scripts? ==
  
+ '''Answer:'''The 
[http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Data_Set_Config
 CSV Data Set Config] element is the best way to do this, as it can create 
multiple variables from a single data file.
+ 
- '''Answer:'''One way to do this is to create a User Parameters Pre-Processor 
in which you list all the values that you want to read from files. You can then 
use the variable names later in the script.
+ '''Answer:'''Another way to do this is to create a User Parameters 
Pre-Processor in which you list all the values that you want to read from 
files. You can then use the variable names later in the script.
  
  For example:
  
@@ -171, +173 @@

   1. Click Add Variable
     1. Set Update once per iteration
     1. Set the Name to the name of the variable (e.g. ACCOUNTID)
-    1. Set the value (under User_1) to ${_StringFromFile(accounts.dat)}
+    1. Set the value (under User_1) to {{{${_StringFromFile(accounts.dat)}}}}
   1. Add Sampler > HTTP Request to Thread Group:
   1. Click the Add button to add a parameter to the request:
     1. Name: account_id
     1. Value: ${ACCOUNTID}
   1. Add Listener > View Results Tree to Thread Group
   1. Save
-  1. create the file accounts.dat containing one line per account id. [In the 
bin directory, unless you add a path to the parameter to _StringFromFile]
+  1. create the file accounts.dat containing one line per account id. If it is 
not in the bin directory, then modify the String``From``File parameter 
accordingly, e.g. {{{${_StringFromFile(../testdata/accounts.dat)} or 
${_StringFromFile(/home/user/testdata/accounts.dat)} or 
${_StringFromFile(C:/work/data/accounts.dat)}}}}
   1. Run > Start
  
  Each iteration, the ACCOUNTID variable will be set to the next line in the 
file, and the HTTP Request will use its value to set the account_id parameter.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to