Bug 53855 - A CSV <EOF> condition is not interpreted as Boolean False by the While-controller
Summary: A CSV <EOF> condition is not interpreted as Boolean False by the While-contro...
Status: RESOLVED INVALID
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.7
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-11 20:49 UTC by Mikhail T.
Modified: 2012-09-12 00:19 UTC (History)
0 users



Attachments
An illustrating test-case (4.42 KB, application/xml)
2012-09-11 20:49 UTC, Mikhail T.
Details
Sample CSV-file refered to by the sample test-plan (23 bytes, text/plain)
2012-09-11 21:00 UTC, Mikhail T.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail T. 2012-09-11 20:49:35 UTC
Created attachment 29356 [details]
An illustrating test-case

When CSV Data set is reading a CSV-file, upon reaching reaching EOF, all of the specified variables are set to "<EOF>" (the exact string representation is controlled by the csvdataset.eofstring property).

Unfortunately, simply using one of the variables as a While-controller's condition is impossible -- apparently, the "<EOF>" is still interpreted as True.

There are examples and code-snippets online, where a simple CSV-set variable is used to control a While-controller, so it was/is possible to do on some earlier releases or some Operating Systems (at least one online posting, for example, mentions it working on properly on Windows, but not on Linux). Instead of simply using

      ${column1}

as a while-controller's condition, one must use something as unwieldy (and unportable) as:

      ${__jexl("${column1}" != "<EOF>")}

It would seem, the Boolean representation of EOF ought to be False regardless of its String representation.
Comment 1 Mikhail T. 2012-09-11 21:00:55 UTC
Created attachment 29360 [details]
Sample CSV-file refered to by the sample test-plan
Comment 2 Sebb 2012-09-12 00:19:23 UTC
The While Controller is documented as looping until the condition matches "false".

Changing this to also match "<EOF>" would potentially break some scripts.

As a work-round, you can use:

csvdataset.eofstring=false
Comment 3 The ASF infrastructure team 2022-09-24 20:37:51 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2922