# CSV feeder not iterating

**URL:** <https://community.gatling.io/t/csv-feeder-not-iterating/3544>\
**Category:** Gatling (Open-Source)\
**Created:** [February 8, 2017, 10:17pm UTC](https://community.gatling.io/t/csv-feeder-not-iterating/3544 "2017-02-08T22:17:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henry\_Katz](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@Henry\_Katz](https://community.gatling.io/u/Henry_Katz)\
**Post date:** [February 8, 2017, 10:17pm UTC](https://community.gatling.io/t/csv-feeder-not-iterating/3544/1 "2017-02-08T22:17:49Z")

</div>

Hi,

Have a csv feeder where the foreach countername is updating counts but not retrieving the ith record of my n record csv file:

val scn =  
scenario(s"franz $runType")  
.feed(certFeeder)  
.feed(csvFeeder)  
.foreach(csvFeeder.records, “record”, “myndx”) {  
exec { session =\>  
flattenMapIntoAttributes("${record}")  
println(s"myndx=${session(“myndx”).as[String]}")

val entBody = genEnt(  
session(“account”).as[String],  
session(“action”).as[String],  
session(“pidPaid”).as[String],  
session(“altCode”).as[String],  
session(“tms”).as[String],  
session(“transactionID”).as[String],  
session(“type”).as[String],  
session(“rights”).as[String].split("\|").toList,  
session(“reps”).as[String].split("\|").toList,  
session(“billingTransactionID”).as[String],  
session(“price”).as[String].toDouble,  
session(“mrPoints”).as[String].toInt  
)  
println(s"ent = $entBody")  
http(“request\_1”).post(session =\> paths(runType)).body(StringBody(entBody)).check(status.is(200))  
session  
}  
}

I am building the permutations from the csv file in csvFeeder and my output shows the entBody not updating but only displaying the first record  
while myndx is successively updated.

The code also ends with “java.lang.UnsupportedOperationException: There were no requests sent during the simulation, reports won’t be generated”

The http invocation worked when placed in a separate exec block but then was not sure how to obtain the session value.

Any suggestions?

Thanks,  
Henry

---

<div class="post-metadata">

**Author:** ![Henry\_Katz](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@Henry\_Katz](https://community.gatling.io/u/Henry_Katz)\
**Post date:** [February 8, 2017, 11:07pm UTC](https://community.gatling.io/t/csv-feeder-not-iterating/3544/2 "2017-02-08T23:07:55Z")

</div>

Quick change based on this thread:

[https://groups.google.com/forum/#!searchin/gatling/post$20session|sort:date/gatling/Wd8TJISeWnE/hj2a-TOUBQAJ](https://groups.google.com/forum/#!searchin/gatling/post%2420session%7Csort:date/gatling/Wd8TJISeWnE/hj2a-TOUBQAJ)

helped disentangle the very sneaky Gatling EL but still no joy with the iterations:

println(s"ent = $entBody")  
session.set(“body”, entBody)  
session  
}  
.exec {  
http(“request\_1”).post(session =\> paths(runType)).body(StringBody(session =\> s"""$${body}"""))  
}  
}

Any idea on the iterations?

Thanks,  
Henry

---

<div class="post-metadata">

**Author:** ![Siegfried\_Goeschl](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@Siegfried\_Goeschl](https://community.gatling.io/u/Siegfried_Goeschl)\
**Post date:** [February 9, 2017, 7:18am UTC](https://community.gatling.io/t/csv-feeder-not-iterating/3544/3 "2017-02-09T07:18:48Z")

</div>

> It might help to create & check Gatling’s debug output - you can pass something like "-Dlogback.configurationFile=conf/logback-debug.xml "

Siegfried Goeschl

---

<div class="post-metadata">

**Author:** ![Henry\_Katz](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@Henry\_Katz](https://community.gatling.io/u/Henry_Katz)\
**Post date:** [February 9, 2017, 7:48am UTC](https://community.gatling.io/t/csv-feeder-not-iterating/3544/4 "2017-02-09T07:48:16Z")

</div>

Thanks, I’ll check that. As always, I found a work around which consisted of dropping the foreach, using the EL fix, but this seems tied to the number of users though I had expressly set the disableclientsharing to have each user fire the same set of requests. Oh well, got a first down, still moving the ball.
