My feeder value fails to get loaded

Hi guys,

Sometimes, the exact same simulation that worked a minute ago, runs into this error:

10:06:12.843 [ERROR] i.g.h.a.s.HttpRequestAction - ‘httpRequest-3’ failed to execute: No attribute named ‘password’ is defined

Failed to build request LOGIN_request_1: No attribute named ‘p 1 (100.0%)
assword’ is defined

If I run the exact same simulation again, more than likely it will work. So it’s a strange intermittent problem.

The relevant code is this:

object Login {
val feeder = csv("/home/george/gatling-charts-highcharts-bundle-2.3.0/user-files/simulations/drt_67_searchANI_play_open/logins.csv").random
val login = exec(http(“LOGIN_request_0”)
.get("/DTR/")
.headers(headers_0))
.pause(3)
.feed(feeder)
.exec(http(“LOGIN_request_1”)
.post("/DTR/list")
.headers(headers_0)
.formParam(“user”, “${username}”)
.formParam(“psw”, “${password}”))
.pause(5)
}

The csv file is of course fine, with the two column names on top and 17 rows of data below, like this:

username,password
user1,pass1
user2,pass2
user3,pass3

Please advise.

Thanks,
George

Hi,

Could you please provide an actionnable reproducer, like a sample project on Github?

Thanks,

Hello and thanks for answering,

As I found out, the problem was due to a blank line at the end of my feeder CSV file. Whenever that was randomly picked, I got the error. So it was my fault after all. It was blank so a bit hard to… see. :slight_smile:

George