CSV feeder not iterating

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

Quick change based on this thread:

https://groups.google.com/forum/#!searchin/gatling/post$20session|sort: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

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

Siegfried Goeschl

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.