I've got an issue with the Loop controller in Jmeter when using a CSV reader which hopefully someone can shed some light on for me.
So I have a CSV file which contains a bunch of currency codes and their respective names (See below), I'm then using the CSV values in a subsequent HTTP Request.
ALL,Albanian Lek
DZD,Algerian Dinar
ARS,Argentine Peso
AMD,Armenian Dram
AUD,Australian Dollar
AZN,Azerbaijan New Manat
BSD,Bahamian Dollar
BHD,Bahraini Dinar
BDT,Bangladeshi Taka
BZD,Belize Dollar
BOB,Bolivian Boliviano
BRL,Brazilian Real
GBP,British Pound
BND,Brunei Dollar
XOF,CFA Franc BCEAO
XAF,CFA Franc BEAC
XPF,CFP Franc
KHR,Cambodian Riel
CAD,Canadian Dollar
CLP,Chilean Peso
CNY,Chinese Yuan Renminbi
COP,Colombian Peso
KMF,Comoros Franc
CRC,Costa Rican Colon
HRK,Croatian Kuna
CZK,Czech Koruna
DKK,Danish Krone
DJF,Djibouti Franc
DOP,Dominican R. Peso
XCD,East Caribbean Dollar
EGP,Egyptian Pound
EEK,Estonian Kroon
EUR,Euro
FJD,Fiji Dollar
HNL,Honduran Lempira
HKD,Hong Kong Dollar
HUF,Hungarian Forint
ISK,Iceland Krona
INR,Indian Rupee
IDR,Indonesian Rupiah
ILS,Israeli New Shekel
JPY,Japanese Yen
JOD,Jordanian Dinar
KZT,Kazakhstan Tenge
KES,Kenyan Shilling
KWD,Kuwaiti Dinar
KGS,Kyrgyzstanian Som
LAK,Lao Kip
LVL,Latvian Lats
LBP,Lebanese Pound
LTL,Lithuanian Litas
MYR,Malaysian Ringgit
MRO,Mauritanian Ouguiya
MUR,Mauritius Rupee
MXN,Mexican Peso
MNT,Mongolian Tugrik
MAD,Moroccan Dirham
NAD,Namibia Dollar
NPR,Nepalese Rupee
NZD,New Zealand Dollar
NIO,Nicaraguan Cordoba Oro
NOK,Norwegian Kroner
OMR,Omani Rial
PKR,Pakistan Rupee
PGK,Papua New Guinea Kina
PYG,Paraguay Guarani
PEN,Peruvian Nuevo Sol
PHP,Philippine Peso
PLN,Polish Zloty
QAR,Qatari Rial
RON,Romanian New Lei
RUB,Russian Rouble
RWF,Rwandan Franc
WST,Samoan Tala
SAR,Saudi Riyal
SGD,Singapore Dollar
SOS,Somali Shilling
ZAR,South African Rand
KRW,South-Korean Won
LKR,Sri Lanka Rupee
SZL,Swaziland Lilangeni
SEK,Swedish Krona
CHF,Swiss Franc
TWD,Taiwan Dollar
TZS,Tanzanian Shilling
THB,Thai Baht
TND,Tunisian Dinar
TRY,Turkish Lira
USD,US Dollar
UGX,Uganda Shilling
UAH,Ukraine Hryvnia
UYU,Uruguayan Peso
AED,Utd. Arab Emir. Dirham
VUV,Vanuatu Vatu
VEF,Venezuelan Bolivar
VND,Vietnamese Dong
ZMK,Zambian Kwacha
In my While Loop I have a the following conditional check: ${__javaScript("EOF" != "${currencyCode}")}
note I have stackoverflow doesnt seem to display the angle brackets but there are there in my JMeter
So what I'm seeing is that the loop is going through the CSV and the required HTTP Request is being sent. However once the last value in the CSV value ("ZMK" in this case) is reached a extra Request is being made with a value of
So it looks like the Whileis doing one more loop than it should be.
I've checked the CSV file in VIM and every other editor I could think of and there are no blank lines or tabs at the end of the CSV file.
If I make my Loop condition ${__javaScript("ZMK" != "${currencyCode}")} everything works fine. But the CSV could grow so I dont want to hardcode anything.
Just to give you a better picture of my test here is the overall picture
+ Thread Group
++ Simple Controller
+++ While Loop with condition ${__javaScript("<EOF>" != "${currencyCode}")}
++++ CSV Reader (Recycle on EOF = FALSE, STOP THREAD ON EOF = FALSE, SHARING = Current Thread)
++++ HTTP Request using value from CSV file
Also my