https://issues.apache.org/bugzilla/show_bug.cgi?id=48943

           Summary: __StringFromFile() skips lines when used in
                    combination with a Config Element
           Product: JMeter
           Version: 2.3.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Main
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: radu.lete...@softvision.ro


Created an attachment (id=25151)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25151)
JMeter Test Plan used to reproduce this bug.

1. Create a new JMeter Test Plan

2. Add a Thread Group and set:
Number of Threads=1
Loop Count=5

3. Add a Bean Shell sampler to your Thread Group and in the "Script" section
add the following two lines:
//${__StringFromFile(Values.txt,readValues)}
System.out.println("___ " + "${readValues}" + "___ ")

4. Add a Simple Config Element to your Thread Group.

5. Save the Test Plan in the {JMETER_HOME}/bin folder.

6. Create a txt file called "Values.txt" in the {JMETER_HOME}/bin folder.

7. Fill in at least 10 lines in the file with some values (E.g. : numbers from
0 to 9).

8. Save the text file and close it.

9. Open your previous created JMeter test plan and run the test.

Expected result:
On the command window that opens with JMeter you can see the output of the
test. We are expecting to see the first 5 values (5 lines) from the txt file.

Actual result:
After JMeter reads a line from the file, it will skip the next line. So, you
will have displayed the lines 1,3,5,7,9.
If you disable the Simple Config Element and run the test again, you will
notice that the behavior is the expected one.
Also, this only reproduces when using loops. If you put, for example, 5 threads
and 1 loop, the values will be correctly displayed.

I attached to this bug a test plan and a data file that can be used to
reproduce this bug, so you don't have to build your test again. Just unzip the
files in the {JMETER_HOME}/bin folder and run the test.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org

Reply via email to