parsing error

Hi there,

I am defining authBody as:

def authBody (user:String, passwd:String) = {

var forLogin = new java.util.HashMapString,String

forLogin.put(“screenWidth”, “1680”)

forLogin.put(“screenHeight”, “1050”)

forLogin.put(“touchStartSupported”, “false”)

forLogin.put(“userName”, user)

forLogin.put(“password”, passwd)

StringBody(

new JSONObject(forLogin).toString()

)

}

and using it in

exec(http(“go/auth”)

.post("""/engine/api/go/auth""")

.headers(header_app_json)

.body(

authBody("${username}","${password}")

)

.check(regex("""“errors”\s*:\s*[\s*[^]]+,""").notExists)

)

with the feeder csv file containing:

username,password
admin@engine.com,Password1

All works as expected, unless I change the csv file to [note the embedded space]

username, password
admin@engine.com,Password1

Shouldn’t you do a trim() before suing the column names?

Thank you,
Radu

Hi,

No. CSV is specified by an RFC and white spaces are not supposed to be trimmed.

Cheers,

Stéphane

Yes, we’re right!
Thx,