You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now it makes it possible to interpret a given path by evaluating any (#696)
* Now it makes it possible to interpret a given path by evaluating any embedded expressions.
* Backed to Java version to 1.8; Backed to standard default delimiter for CSV; Changed plugin version from 0.3 to 0.2
* updated the wiki
* fixed markdown
* Reverted formatting changes to the old 'GoogleCode' format.
* Now the dialog opens in the directory where the current .jmx file is located
* Imports fixed
* Reverted BrowseAction
---------
Co-authored-by: Ilya Ulizko <[email protected]>
This Config item allows you to load variable values from CSV file. Variable names and values taken from CSV file, name from first column, value from second column, respectively.
5
+
This Config item allows you to load variable values from CSV file. Variable names and values taken from CSV file, name from first column, value from second column, respectively. In the <i>CSV File:</i> window, you can specify the absolute path to your csv file. However, to make your test plans more portable, you can also use dynamic path by evaluating ${} expressions.
6
6
7
7
== Tutorial ==
8
-
Let's create a text file _c:\temp\testvariables.csv_ with following content:
8
+
Let's create a text file <i>c:\temp\testvariables.csv</i> with following content:
9
9
10
10
{{{
11
11
First_Variable,here comes value 1
12
12
Second_Variable,and here value 2
13
-
}}}
13
+
}}}
14
14
15
-
Let's create test plan with _Variables From CSV File_, _Thread Group_, _Debug Sampler_ and _View Results Tree_. Then configure _Variables From CSV File_, give it filename _testvariables.csv_, optional variable prefix `MyVar_` and column separator ','. Now your plan should look like this:
15
+
1. To use the absolute path, let's create test plan with <i>Variables From CSV File</i>, <i>Thread Group</i>, <i>Debug Sampler</i> and <i>View Results Tree</i>. Then configure <i>Variables From CSV File</i>, specify the absolute path to <i>testvariables.csv</i>, optional variable prefix `MyVar_` and column separator ','. Now your plan should look like this:
16
16
17
-
[/img/wiki/varsfromcsv1.png]
17
+
[/site/img/wiki/varsfromcsv1.png]
18
18
19
-
Save this test plan to _c:\temp\test1.jmx_.
19
+
Save this test plan to <i>c:\temp\test1.jmx</i>.
20
20
21
-
Now, run the test, go to _View Results Tree_ and click on _Debug Sampler_, then click on _Response data_ tab. You'll see that your variables from _testvariables.csv_ are defined in JMeter, e.g.:
21
+
Now, run the test, go to <i>View Results Tree</i> and click on <i>Debug Sampler</i>, then click on <i>Response data</i> tab. You'll see that your variables from <i>testvariables.csv</i> are defined in JMeter, e.g.:
22
22
23
23
{{{
24
24
JMeterVariables:
@@ -30,4 +30,12 @@ START.HMS=153028
30
30
START.MS=1264671028968
31
31
START.YMD=20100128
32
32
TESTSTART.MS=1264671163750
33
-
}}}
33
+
}}}
34
+
35
+
2. To use dynamic path you should specify expressions enclosed in ${}, e.g.:
This expression dynamically resolves the path (like <i>D:\JAVA_pet_projects\resources\properties.csv</i>) relative to the directory of the current <i>.jmx</i> file.
0 commit comments